Skip to content

Commit 24490c9

Browse files
authored
Merge pull request #16 from OpenVoiceOS/dev
2 parents 117a45a + d6c0ab9 commit 24490c9

33 files changed

+2507
-46
lines changed

.github/workflows/build_tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run Build Tests
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build_tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
ref: ${{ github.head_ref }}
13+
- name: Setup Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.8
17+
- name: Install Build Tools
18+
run: |
19+
python -m pip install build wheel
20+
- name: Install System Dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt install python3-dev swig libssl-dev libfann-dev portaudio19-dev libpulse-dev
24+
- name: Build Source Packages
25+
run: |
26+
python setup.py sdist
27+
- name: Build Distribution Packages
28+
run: |
29+
python setup.py bdist_wheel
30+
- name: Install tflite_runtime workaround tflit bug
31+
run: |
32+
pip3 install numpy
33+
pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime
34+
- name: Install core repo
35+
run: |
36+
pip install .[audio-backend,mark1,stt,tts,skills_minimal,skills,gui,bus,all]

.github/workflows/install_tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Install Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- dev
7+
workflow_dispatch:
8+
9+
jobs:
10+
install:
11+
strategy:
12+
max-parallel: 2
13+
matrix:
14+
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Setup Python
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install Build Tools
23+
run: |
24+
python -m pip install build wheel
25+
- name: Install System Dependencies
26+
run: |
27+
sudo apt-get update
28+
sudo apt install python3-dev swig libssl-dev
29+
- name: Build Distribution Packages
30+
run: |
31+
python setup.py bdist_wheel
32+
- name: Install package
33+
run: |
34+
pip install .[all]

.github/workflows/license_tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Run License Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- dev
9+
workflow_dispatch:
10+
11+
jobs:
12+
license_tests:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup Python
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.8
20+
- name: Install Build Tools
21+
run: |
22+
python -m pip install build wheel
23+
- name: Install System Dependencies
24+
run: |
25+
sudo apt-get update
26+
sudo apt install python3-dev swig libssl-dev
27+
- name: Install core repo
28+
run: |
29+
pip install .
30+
- name: Get explicit and transitive dependencies
31+
run: |
32+
pip freeze > requirements-all.txt
33+
- name: Check python
34+
id: license_check_report
35+
uses: pilosus/action-pip-license-checker@v0.5.0
36+
with:
37+
requirements: 'requirements-all.txt'
38+
fail: 'Copyleft,Other,Error'
39+
fails-only: true
40+
exclude: '^(tqdm).*'
41+
exclude-license: '^(Mozilla).*$'
42+
- name: Print report
43+
if: ${{ always() }}
44+
run: echo "${{ steps.license_check_report.outputs.report }}"

.github/workflows/notify_matrix.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Close Pull Request
2+
3+
# only trigger on pull request closed events
4+
on:
5+
pull_request:
6+
types: [ closed ]
7+
8+
jobs:
9+
merge_job:
10+
# this job will only run if the PR has been merged
11+
if: github.event.pull_request.merged == true
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Send message to Matrix bots channel
16+
id: matrix-chat-message
17+
uses: fadenb/matrix-chat-message@v0.0.6
18+
with:
19+
homeserver: 'matrix.org'
20+
token: ${{ secrets.MATRIX_TOKEN }}
21+
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org'
22+
message: |
23+
new ovos-config PR merged! https://github.com/OpenVoiceOS/ovos-bus-client/pull/${{ github.event.number }}

.github/workflows/propose_release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Propose Stable Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release_type:
6+
type: choice
7+
description: Release Type
8+
options:
9+
- build
10+
- minor
11+
- major
12+
jobs:
13+
update_version:
14+
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master
15+
with:
16+
release_type: ${{ inputs.release_type }}
17+
version_file: ovos_bus_client/version.py
18+
alpha_var: VERSION_ALPHA
19+
build_var: VERSION_BUILD
20+
minor_var: VERSION_MINOR
21+
major_var: VERSION_MAJOR
22+
update_changelog: True
23+
branch: dev
24+
25+
pull_changes:
26+
needs: update_version
27+
uses: neongeckocom/.github/.github/workflows/pull_master.yml@master
28+
with:
29+
pr_assignee: ${{ github.actor }}
30+
pr_draft: false
31+
pr_title: ${{ needs.update_version.outputs.version }}
32+
pr_body: ${{ needs.update_version.outputs.changelog }}

.github/workflows/publish_alpha.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This workflow will generate a distribution and upload it to PyPI
2+
3+
name: Publish Alpha Build ...aX
4+
on:
5+
push:
6+
branches:
7+
- dev
8+
paths-ignore:
9+
- 'ovos_bus_client/version.py'
10+
- 'test/**'
11+
- 'examples/**'
12+
- '.github/**'
13+
- '.gitignore'
14+
- 'LICENSE'
15+
- 'CHANGELOG.md'
16+
- 'MANIFEST.in'
17+
- 'readme.md'
18+
- 'scripts/**'
19+
workflow_dispatch:
20+
21+
jobs:
22+
update_version:
23+
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master
24+
with:
25+
release_type: "alpha"
26+
version_file: ovos_bus_client/version.py
27+
alpha_var: VERSION_ALPHA
28+
build_var: VERSION_BUILD
29+
minor_var: VERSION_MINOR
30+
major_var: VERSION_MAJOR
31+
update_changelog: True
32+
branch: dev
33+
build_and_publish:
34+
runs-on: ubuntu-latest
35+
needs: update_version
36+
steps:
37+
- name: Create Release
38+
id: create_release
39+
uses: actions/create-release@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
42+
with:
43+
tag_name: V${{ needs.update_version.outputs.version }}
44+
release_name: Release ${{ needs.update_version.outputs.version }}
45+
body: |
46+
Changes in this Release
47+
${{ needs.update_version.outputs.changelog }}
48+
draft: false
49+
prerelease: true
50+
commitish: dev
51+
- name: Checkout Repository
52+
uses: actions/checkout@v2
53+
with:
54+
ref: dev
55+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
56+
- name: Build Distribution Packages
57+
run: |
58+
python setup.py sdist bdist_wheel
59+
- name: Publish to PyPI
60+
uses: pypa/gh-action-pypi-publish@release/v1
61+
with:
62+
password: ${{secrets.PYPI_TOKEN}}

.github/workflows/publish_release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
github_release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
ref: master
14+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
15+
- name: version
16+
run: echo "::set-output name=version::$(python setup.py --version)"
17+
id: version
18+
- name: "Generate release changelog"
19+
uses: heinrichreimer/github-changelog-generator-action@v2.3
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
id: changelog
23+
- name: Create Release
24+
id: create_release
25+
uses: actions/create-release@v1
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
28+
with:
29+
tag_name: V${{ steps.version.outputs.version }}
30+
release_name: Release ${{ steps.version.outputs.version }}
31+
body: |
32+
Changes in this Release
33+
${{ steps.changelog.outputs.changelog }}
34+
draft: false
35+
prerelease: false
36+
commitish: master
37+
- name: Build Distribution Packages
38+
run: |
39+
python setup.py sdist bdist_wheel
40+
- name: Publish to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
password: ${{secrets.PYPI_TOKEN}}

.github/workflows/unit_tests.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Run UnitTests
2+
on:
3+
pull_request:
4+
branches:
5+
- dev
6+
paths-ignore:
7+
- 'ovos_bus_client/version.py'
8+
- 'examples/**'
9+
- '.github/**'
10+
- '.gitignore'
11+
- 'LICENSE'
12+
- 'CHANGELOG.md'
13+
- 'MANIFEST.in'
14+
- 'readme.md'
15+
- 'scripts/**'
16+
push:
17+
branches:
18+
- master
19+
paths-ignore:
20+
- 'ovos_bus_client/version.py'
21+
- 'requirements/**'
22+
- 'examples/**'
23+
- '.github/**'
24+
- '.gitignore'
25+
- 'LICENSE'
26+
- 'CHANGELOG.md'
27+
- 'MANIFEST.in'
28+
- 'readme.md'
29+
- 'scripts/**'
30+
workflow_dispatch:
31+
32+
jobs:
33+
unit_tests:
34+
strategy:
35+
max-parallel: 2
36+
matrix:
37+
python-version: [ 3.7, 3.8, 3.9]
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 15
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Set up python ${{ matrix.python-version }}
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
- name: Install System Dependencies
47+
run: |
48+
sudo apt-get update
49+
sudo apt install python3-dev swig
50+
python -m pip install build wheel
51+
- name: Install repo
52+
run: |
53+
pip install .
54+
- name: Install test dependencies
55+
run: |
56+
pip install -r test/requirements.txt
57+
- name: Run unittests
58+
run: |
59+
pytest --cov=ovos_bus_client --cov-report xml test/unittests
60+
# NOTE: additional pytest invocations should also add the --cov-append flag
61+
# or they will overwrite previous invocations' coverage reports
62+
# (for an example, see OVOS Skill Manager's workflow)
63+
- name: Upload coverage
64+
env:
65+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
66+
uses: codecov/codecov-action@v2

0 commit comments

Comments
 (0)