Trying to add KiCad 6 tests
This commit is contained in:
parent
256876a1bd
commit
fb6d637c17
|
|
@ -1,7 +1,7 @@
|
||||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python.
|
# This workflow will install Python dependencies, run tests and lint with a single version of Python.
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||||
|
|
||||||
name: Python application
|
name: Regression tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -21,9 +21,12 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
ki_release: [latest, ki6]
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: setsoft/kicad_auto_test:latest
|
container: setsoft/kicad_auto_test:${{ matrix.ki_release }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
@ -35,10 +38,10 @@ jobs:
|
||||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||||
# exit-zero treats all errors as warnings.
|
# exit-zero treats all errors as warnings.
|
||||||
flake8 . --count --exit-zero --statistics
|
flake8 . --count --exit-zero --statistics
|
||||||
- name: Test with pytest
|
- name: Test ${{ matrix.ki_release }}
|
||||||
env:
|
|
||||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
|
rm -rf output
|
||||||
|
rm -f tests/.local
|
||||||
python3-coverage erase
|
python3-coverage erase
|
||||||
# Create the caches with macros
|
# Create the caches with macros
|
||||||
python3-coverage run -a src/kibot --help-outputs > /dev/null
|
python3-coverage run -a src/kibot --help-outputs > /dev/null
|
||||||
|
|
@ -46,17 +49,21 @@ jobs:
|
||||||
# pytest-3 --log-cli-level debug -k "test_misc" --test_dir output
|
# pytest-3 --log-cli-level debug -k "test_misc" --test_dir output
|
||||||
python3-coverage report
|
python3-coverage report
|
||||||
python3-coverage html -d output/htmlcov
|
python3-coverage html -d output/htmlcov
|
||||||
coveralls
|
|
||||||
- name: Store results
|
- name: Store results
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: Test_Output
|
name: Test_Output_${{ matrix.ki_release }}
|
||||||
path: output
|
path: output
|
||||||
|
- name: Upload Coverage
|
||||||
|
env:
|
||||||
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||||
|
COVERALLS_FLAG_NAME: ${{ matrix.ki_release }}
|
||||||
|
COVERALLS_PARALLEL: true
|
||||||
|
run: coveralls
|
||||||
|
|
||||||
|
|
||||||
push_to_registry:
|
push_to_registry:
|
||||||
|
|
||||||
name: Push Docker image to Docker Hub
|
name: Push Docker image to Docker Hub
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: test
|
||||||
|
|
@ -84,3 +91,15 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
tags: setsoft/kicad_auto:dev
|
tags: setsoft/kicad_auto:dev
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
coveralls:
|
||||||
|
name: Finish Coveralls
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Finished
|
||||||
|
env:
|
||||||
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||||
|
run: |
|
||||||
|
curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]="$GITHUB_RUN_ID"&payload[status]=done"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue