-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7de3c62
Showing
32 changed files
with
1,013 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Run Build Tests | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Install System Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install python3-dev swig libssl-dev libfann-dev portaudio19-dev libpulse-dev | ||
- name: Build Source Packages | ||
run: | | ||
python setup.py sdist | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Install tflite_runtime workaround tflit bug | ||
run: | | ||
pip3 install numpy | ||
pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime | ||
- name: Install core repo | ||
run: | | ||
pip install .[audio-backend,mark1,stt,tts,skills_minimal,skills,gui,bus,all] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# auto add labels to PRs | ||
on: | ||
pull_request_target: | ||
types: [ opened, edited ] | ||
name: conventional-release-labels | ||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: bcoe/conventional-release-labels@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Run Install Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
install: | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, "3.10" ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Install System Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install python3-dev swig libssl-dev | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Install package | ||
run: | | ||
pip install .[all] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Run License Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
license_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Install System Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install python3-dev swig libssl-dev | ||
- name: Install core repo | ||
run: | | ||
pip install . | ||
- name: Get explicit and transitive dependencies | ||
run: | | ||
pip freeze > requirements-all.txt | ||
- name: Check python | ||
id: license_check_report | ||
uses: pilosus/[email protected] | ||
with: | ||
requirements: 'requirements-all.txt' | ||
fail: 'Copyleft,Other,Error' | ||
fails-only: true | ||
exclude: '^(tqdm).*' | ||
exclude-license: '^(Mozilla).*$' | ||
- name: Print report | ||
if: ${{ always() }} | ||
run: echo "${{ steps.license_check_report.outputs.report }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Stable Release | ||
on: | ||
push: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish_stable: | ||
uses: TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master | ||
secrets: inherit | ||
with: | ||
branch: 'master' | ||
version_file: 'ovos_commonqa/version.py' | ||
setup_py: 'setup.py' | ||
publish_release: true | ||
|
||
publish_pypi: | ||
needs: publish_stable | ||
if: success() # Ensure this job only runs if the previous job succeeds | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: version | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{secrets.PYPI_TOKEN}} | ||
|
||
|
||
sync_dev: | ||
needs: publish_stable | ||
if: success() # Ensure this job only runs if the previous job succeeds | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
ref: master | ||
- name: Push master -> dev | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: Release Alpha and Propose Stable | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: [dev] | ||
|
||
jobs: | ||
publish_alpha: | ||
if: github.event.pull_request.merged == true | ||
uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master | ||
secrets: inherit | ||
with: | ||
branch: 'dev' | ||
version_file: 'ovos_commonqa/version.py' | ||
setup_py: 'setup.py' | ||
update_changelog: true | ||
publish_prerelease: true | ||
changelog_max_issues: 100 | ||
|
||
notify: | ||
if: github.event.pull_request.merged == true | ||
needs: publish_alpha | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Send message to Matrix bots channel | ||
id: matrix-chat-message | ||
uses: fadenb/[email protected] | ||
with: | ||
homeserver: 'matrix.org' | ||
token: ${{ secrets.MATRIX_TOKEN }} | ||
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' | ||
message: | | ||
new ${{ github.event.repository.name }} PR merged! https://github.com/${{ github.repository }}/pull/${{ github.event.number }} | ||
publish_pypi: | ||
needs: publish_alpha | ||
if: success() # Ensure this job only runs if the previous job succeeds | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: version | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{secrets.PYPI_TOKEN}} | ||
|
||
|
||
propose_release: | ||
needs: publish_alpha | ||
if: success() # Ensure this job only runs if the previous job succeeds | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout dev branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: dev | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Get version from setup.py | ||
id: get_version | ||
run: | | ||
VERSION=$(python setup.py --version) | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Create and push new branch | ||
run: | | ||
git checkout -b release-${{ env.VERSION }} | ||
git push origin release-${{ env.VERSION }} | ||
- name: Open Pull Request from dev to master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
# Variables | ||
BRANCH_NAME="release-${{ env.VERSION }}" | ||
BASE_BRANCH="master" | ||
HEAD_BRANCH="release-${{ env.VERSION }}" | ||
PR_TITLE="Release ${{ env.VERSION }}" | ||
PR_BODY="Human review requested!" | ||
# Create a PR using GitHub API | ||
curl -X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-d "{\"title\":\"$PR_TITLE\",\"body\":\"$PR_BODY\",\"head\":\"$HEAD_BRANCH\",\"base\":\"$BASE_BRANCH\"}" \ | ||
https://api.github.com/repos/${{ github.repository }}/pulls | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Run script on merge to dev by gitlocalize-app | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
run-script: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Run script if merged by gitlocalize-app[bot] | ||
if: github.event_name == 'push' && github.event.head_commit.author.username == 'gitlocalize-app[bot]' | ||
run: | | ||
python scripts/sync_translations.py | ||
- name: Commit to dev | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Update translations | ||
branch: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Run UnitTests | ||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
paths-ignore: | ||
- 'ovos_commonqa/version.py' | ||
- 'examples/**' | ||
- '.github/**' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- 'CHANGELOG.md' | ||
- 'MANIFEST.in' | ||
- 'README.md' | ||
- 'scripts/**' | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- 'ovos_commonqa/version.py' | ||
- 'requirements/**' | ||
- 'examples/**' | ||
- '.github/**' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- 'CHANGELOG.md' | ||
- 'MANIFEST.in' | ||
- 'README.md' | ||
- 'scripts/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit_tests: | ||
strategy: | ||
matrix: | ||
python-version: [3.9] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install System Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install python3-dev swig | ||
python -m pip install build wheel | ||
- name: Install repo | ||
run: | | ||
pip install -e . | ||
- name: Install test dependencies | ||
run: | | ||
pip install -r tests/requirements.txt | ||
- name: Run unittests | ||
run: | | ||
pytest --cov=ovos_commonqa --cov-report=xml ./tests | ||
- name: Upload coverage | ||
if: "${{ matrix.python-version == '3.9' }}" | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
files: coverage.xml | ||
verbose: true |
Oops, something went wrong.