Skip to content

Commit ccba0bd

Browse files
authored
Merge pull request #732 from OpenVoiceOS/release-2.1.0a1
Release 2.1.0a1
2 parents 7cee31b + 7334483 commit ccba0bd

File tree

131 files changed

+3081
-8625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+3081
-8625
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
relative_files = true

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ updates:
88
- package-ecosystem: "pip" # See documentation for possible values
99
directory: "/requirements" # Location of package manifests
1010
schedule:
11-
interval: "weekly"
11+
interval: "daily"

.github/workflows/coverage.yml

Lines changed: 31 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,36 @@
1-
name: Run CodeCov
1+
# .github/workflows/coverage.yml
2+
name: Post coverage comment
3+
24
on:
3-
push:
4-
branches:
5-
- dev
6-
workflow_dispatch:
5+
workflow_run:
6+
workflows: ["Run Tests"]
7+
types:
8+
- completed
79

810
jobs:
9-
run:
11+
test:
12+
name: Run tests & display coverage
1013
runs-on: ubuntu-latest
11-
env:
12-
PYTHON: "3.11"
14+
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
15+
permissions:
16+
# Gives the action the necessary permissions for publishing new
17+
# comments in pull requests.
18+
pull-requests: write
19+
# Gives the action the necessary permissions for editing existing
20+
# comments (to avoid publishing multiple comments in the same PR)
21+
contents: write
22+
# Gives the action the necessary permissions for looking up the
23+
# workflow that launched this workflow, and download the related
24+
# artifact that contains the comment to be published
25+
actions: read
1326
steps:
14-
- uses: actions/checkout@master
15-
- name: Setup Python
16-
uses: actions/setup-python@master
17-
with:
18-
python-version: "3.11"
19-
- name: Install System Dependencies
20-
run: |
21-
sudo apt-get update
22-
sudo apt install python3-dev libssl-dev libfann-dev portaudio19-dev libpulse-dev
23-
python -m pip install build wheel
24-
- name: Install test dependencies
25-
run: |
26-
pip install -r requirements/tests.txt
27-
pip install ./test/integrationtests/common_query/ovos_tskill_fakewiki
28-
pip install ./test/end2end/skill-ovos-hello-world
29-
pip install ./test/end2end/skill-ovos-fallback-unknown
30-
pip install ./test/end2end/skill-ovos-slow-fallback
31-
pip install ./test/end2end/skill-converse_test
32-
pip install ./test/end2end/skill-ovos-schedule
33-
pip install ./test/end2end/skill-new-stop
34-
pip install ./test/end2end/skill-old-stop
35-
pip install ./test/end2end/skill-fake-fm
36-
pip install ./test/end2end/skill-ovos-fakewiki
37-
pip install ./test/end2end/metadata-test-plugin
38-
- name: Install core repo
39-
run: |
40-
pip install -e .[mycroft,deprecated,plugins]
41-
- name: Generate coverage report
42-
run: |
43-
pytest --cov=ovos_core --cov-report xml test/unittests
44-
pytest --cov-append --cov=ovos_core --cov-report xml test/end2end
45-
- name: Generate coverage report with padatious
46-
run: |
47-
sudo apt install libfann-dev
48-
pip install .[lgpl]
49-
pytest --cov-append --cov=ovos_core --cov-report xml test/unittests/skills
50-
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v3
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
54-
directory: ./coverage/reports/
55-
fail_ci_if_error: true
56-
files: ./coverage.xml,!./cache
57-
flags: unittests
58-
name: codecov-umbrella
59-
verbose: true
27+
# DO NOT run actions/checkout here, for security reasons
28+
# For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
29+
- name: Post comment
30+
uses: py-cov-action/python-coverage-comment-action@v3
31+
with:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
34+
# Update those if you changed the default values:
35+
# COMMENT_ARTIFACT_NAME: python-coverage-comment-action
36+
# COMMENT_FILENAME: python-coverage-comment-action.txt

.github/workflows/end2end_tests.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish Coverage to gh-pages
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write # Required to push to gh-pages
11+
12+
jobs:
13+
test-and-publish-coverage:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.11"
24+
25+
- name: Install dependencies
26+
run: |
27+
sudo apt-get update
28+
sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev libfann-dev
29+
python -m pip install build wheel uv
30+
31+
- name: Install core repo
32+
run: |
33+
uv pip install --system -e .[mycroft,plugins,skills-essential,lgpl,test]
34+
35+
- name: Run tests and collect coverage
36+
run: |
37+
coverage run -m pytest test/
38+
coverage html
39+
rm ./htmlcov/.gitignore
40+
41+
- name: Deploy coverage report to GitHub Pages
42+
uses: peaceiris/actions-gh-pages@v3
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: ./htmlcov
46+
publish_branch: gh-pages

.github/workflows/integration_tests.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/unit_tests.yml

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,73 @@
1-
name: Run UnitTests
1+
name: Run Tests
22
on:
33
pull_request:
44
branches:
55
- dev
66
paths-ignore:
77
- 'ovos_core/version.py'
8-
- 'examples/**'
98
- '.github/**'
109
- '.gitignore'
1110
- 'LICENSE'
1211
- 'CHANGELOG.md'
1312
- 'MANIFEST.in'
14-
- 'readme.md'
13+
- 'README.md'
1514
- 'scripts/**'
1615
push:
1716
branches:
18-
- master
17+
- dev
1918
paths-ignore:
2019
- 'ovos_core/version.py'
2120
- 'requirements/**'
22-
- 'examples/**'
2321
- '.github/**'
2422
- '.gitignore'
2523
- 'LICENSE'
2624
- 'CHANGELOG.md'
2725
- 'MANIFEST.in'
28-
- 'readme.md'
26+
- 'README.md'
2927
- 'scripts/**'
3028
workflow_dispatch:
3129

3230
jobs:
3331
unit_tests:
34-
strategy:
35-
max-parallel: 3
36-
matrix:
37-
python-version: ["3.11"]
3832
runs-on: ubuntu-latest
33+
permissions:
34+
# Gives the action the necessary permissions for publishing new
35+
# comments in pull requests.
36+
pull-requests: write
37+
# Gives the action the necessary permissions for pushing data to the
38+
# python-coverage-comment-action branch, and for editing existing
39+
# comments (to avoid publishing multiple comments in the same PR)
40+
contents: write
3941
timeout-minutes: 35
4042
steps:
4143
- uses: actions/checkout@v4
42-
- name: Set up python ${{ matrix.python-version }}
44+
- name: Set up python
4345
uses: actions/setup-python@v5
4446
with:
45-
python-version: ${{ matrix.python-version }}
47+
python-version: "3.11"
4648
- name: Install System Dependencies
4749
run: |
4850
sudo apt-get update
49-
sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev
51+
sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev libfann-dev
5052
python -m pip install build wheel uv
51-
- name: Install test dependencies
52-
run: |
53-
uv pip install --system -r requirements/tests.txt
5453
- name: Install core repo
5554
run: |
56-
uv pip install --system -e .[mycroft,plugins]
57-
- name: Run unittests
58-
run: |
59-
pytest --cov=ovos_core --cov-report xml test/unittests
60-
- name: Install padatious
61-
run: |
62-
sudo apt install libfann-dev
63-
uv pip install --system .[lgpl]
64-
- name: Run unittests with padatious
55+
uv pip install --system -e .[mycroft,plugins,skills-essential,lgpl,test]
56+
- name: Run tests
6557
run: |
66-
pytest --cov-append --cov=ovos_core --cov-report xml test/unittests
67-
- name: Upload coverage
68-
env:
69-
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
70-
uses: codecov/codecov-action@v3
58+
pytest --cov=ovos_core --cov-report xml test/
59+
60+
- name: Coverage comment
61+
id: coverage_comment
62+
uses: py-cov-action/python-coverage-comment-action@v3
63+
with:
64+
GITHUB_TOKEN: ${{ github.token }}
65+
66+
- name: Store Pull Request comment to be posted
67+
uses: actions/upload-artifact@v4
68+
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
7169
with:
72-
token: ${{ secrets.CODECOV_TOKEN }}
73-
directory: ./coverage/reports/
74-
fail_ci_if_error: true
75-
files: ./coverage.xml,!./cache
76-
flags: unittests
77-
name: codecov-unittests
78-
verbose: true
70+
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
71+
name: python-coverage-comment-action
72+
# If you use a different name, update COMMENT_FILENAME accordingly
73+
path: python-coverage-comment-action.txt

0 commit comments

Comments
 (0)