Skip to content

Commit fb6d637

Browse files
committed
Trying to add KiCad 6 tests
1 parent 256876a commit fb6d637

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

.github/workflows/pythonapp.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python.
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python application
4+
name: Regression tests
55

66
on:
77
push:
@@ -21,9 +21,12 @@ on:
2121

2222
jobs:
2323
test:
24+
strategy:
25+
matrix:
26+
ki_release: [latest, ki6]
2427

2528
runs-on: ubuntu-latest
26-
container: setsoft/kicad_auto_test:latest
29+
container: setsoft/kicad_auto_test:${{ matrix.ki_release }}
2730

2831
steps:
2932
- uses: actions/checkout@v2
@@ -35,28 +38,32 @@ jobs:
3538
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3639
# exit-zero treats all errors as warnings.
3740
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 }}
4142
run: |
43+
rm -rf output
44+
rm -f tests/.local
4245
python3-coverage erase
4346
# Create the caches with macros
4447
python3-coverage run -a src/kibot --help-outputs > /dev/null
4548
pytest-3 --test_dir output
4649
# pytest-3 --log-cli-level debug -k "test_misc" --test_dir output
4750
python3-coverage report
4851
python3-coverage html -d output/htmlcov
49-
coveralls
5052
- name: Store results
5153
if: ${{ always() }}
5254
uses: actions/upload-artifact@v1
5355
with:
54-
name: Test_Output
56+
name: Test_Output_${{ matrix.ki_release }}
5557
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
5664

5765

5866
push_to_registry:
59-
6067
name: Push Docker image to Docker Hub
6168
runs-on: ubuntu-latest
6269
needs: test
@@ -84,3 +91,15 @@ jobs:
8491
push: true
8592
tags: setsoft/kicad_auto:dev
8693
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

Comments
 (0)