1
1
# This workflow will install Python dependencies, run tests and lint with a single version of Python.
2
2
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
3
4
- name : Python application
4
+ name : Regression tests
5
5
6
6
on :
7
7
push :
21
21
22
22
jobs :
23
23
test :
24
+ strategy :
25
+ matrix :
26
+ ki_release : [latest, ki6]
24
27
25
28
runs-on : ubuntu-latest
26
- container : setsoft/kicad_auto_test:latest
29
+ container : setsoft/kicad_auto_test:${{ matrix.ki_release }}
27
30
28
31
steps :
29
32
- uses : actions/checkout@v2
@@ -35,28 +38,32 @@ jobs:
35
38
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36
39
# exit-zero treats all errors as warnings.
37
40
flake8 . --count --exit-zero --statistics
38
- - name : Test with pytest
39
- env :
40
- COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
41
+ - name : Test ${{ matrix.ki_release }}
41
42
run : |
43
+ rm -rf output
44
+ rm -f tests/.local
42
45
python3-coverage erase
43
46
# Create the caches with macros
44
47
python3-coverage run -a src/kibot --help-outputs > /dev/null
45
48
pytest-3 --test_dir output
46
49
# pytest-3 --log-cli-level debug -k "test_misc" --test_dir output
47
50
python3-coverage report
48
51
python3-coverage html -d output/htmlcov
49
- coveralls
50
52
- name : Store results
51
53
if : ${{ always() }}
52
54
uses : actions/upload-artifact@v1
53
55
with :
54
- name : Test_Output
56
+ name : Test_Output_${{ matrix.ki_release }}
55
57
path : output
58
+ - name : Upload Coverage
59
+ env :
60
+ COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
61
+ COVERALLS_FLAG_NAME : ${{ matrix.ki_release }}
62
+ COVERALLS_PARALLEL : true
63
+ run : coveralls
56
64
57
65
58
66
push_to_registry :
59
-
60
67
name : Push Docker image to Docker Hub
61
68
runs-on : ubuntu-latest
62
69
needs : test
84
91
push : true
85
92
tags : setsoft/kicad_auto:dev
86
93
labels : ${{ steps.meta.outputs.labels }}
94
+
95
+ coveralls :
96
+ name : Finish Coveralls
97
+ needs : test
98
+ runs-on : ubuntu-latest
99
+ steps :
100
+ - name : Finished
101
+ env :
102
+ COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
103
+ run : |
104
+ curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]="$GITHUB_RUN_ID"&payload[status]=done"
105
+
0 commit comments