Skip to content

Commit c22a14e

Browse files
authored
refactor: ovoscope (#691)
moved to the new end2end test framework https://github.com/TigreGotico/ovoscope drop codecov for self hosted solution
1 parent 85bd6a6 commit c22a14e

File tree

84 files changed

+364
-6869
lines changed

Some content is hidden

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

84 files changed

+364
-6869
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/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.

.github/workflows/integration_tests.yml

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

.github/workflows/unit_tests.yml

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
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

@@ -34,8 +32,16 @@ jobs:
3432
strategy:
3533
max-parallel: 3
3634
matrix:
37-
python-version: ["3.11"]
35+
python-version: ["3.11", "3.12"]
3836
runs-on: ubuntu-latest
37+
permissions:
38+
# Gives the action the necessary permissions for publishing new
39+
# comments in pull requests.
40+
pull-requests: write
41+
# Gives the action the necessary permissions for pushing data to the
42+
# python-coverage-comment-action branch, and for editing existing
43+
# comments (to avoid publishing multiple comments in the same PR)
44+
contents: write
3945
timeout-minutes: 35
4046
steps:
4147
- uses: actions/checkout@v4
@@ -46,33 +52,26 @@ jobs:
4652
- name: Install System Dependencies
4753
run: |
4854
sudo apt-get update
49-
sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev
55+
sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev libfann-dev
5056
python -m pip install build wheel uv
51-
- name: Install test dependencies
52-
run: |
53-
uv pip install --system -r requirements/tests.txt
5457
- name: Install core repo
5558
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
59+
uv pip install --system -e .[mycroft,plugins,skills-essential,lgpl,test]
60+
- name: Run tests
6561
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
62+
pytest --cov=ovos_core --cov-report xml test/
63+
64+
- name: Coverage comment
65+
id: coverage_comment
66+
uses: py-cov-action/python-coverage-comment-action@v3
67+
with:
68+
GITHUB_TOKEN: ${{ github.token }}
69+
70+
- name: Store Pull Request comment to be posted
71+
uses: actions/upload-artifact@v4
72+
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
7173
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
74+
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
75+
name: python-coverage-comment-action
76+
# If you use a different name, update COMMENT_FILENAME accordingly
77+
path: python-coverage-comment-action.txt

.gitignore

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,23 @@ dev.env
55
*.pyc
66
*.swp
77
*~
8-
mimic
9-
/skills
10-
pocketsphinx-python
118
*.egg-info/
129
build
1310
dist
1411
tornado.web
1512
tornado.ioloop
16-
mycroft/__version__.py
17-
scripts/logs/*
18-
logs/*
19-
.coverage
20-
/htmlcov
21-
test/audio_accuracy/data
22-
scripts/*.screen
23-
doc/_build/
2413
.installed
2514
.mypy_cache
2615
.vscode
2716
.theia
2817
.venv/
2918

3019
# Created by unit tests
31-
test/unittests/skills/test_skill/settings.json
32-
test_conf.json
20+
coverage.xml
21+
pytest.ini
22+
.coverage
23+
.testmondata*
3324
.pytest_cache/
25+
/htmlcov
3426
/.gtm/
3527
!/.ruff_cache/

codecov.yml

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

requirements/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ combo-lock>=0.2.2, <0.4
66
padacioso>=1.0.0, <2.0.0
77
ovos-adapt-parser>=1.0.5, <2.0.0
88
ovos_ocp_pipeline_plugin>=1.0.10, <2.0.0
9-
ovos-common-query-pipeline-plugin>=1.0.5, <2.0.0
9+
ovos-common-query-pipeline-plugin>=1.0.5,<2.0.0
1010
ovos-persona>=0.4.4,<1.0.0
1111

1212
ovos-utils[extras]>=0.6.0,<1.0.0

0 commit comments

Comments
 (0)