forked from obra/kicad-automation-scripts
-
Notifications
You must be signed in to change notification settings - Fork 19
114 lines (109 loc) · 4.15 KB
/
Copy pathpythonapp.yml
File metadata and controls
114 lines (109 loc) · 4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Regression tests
on:
push:
paths:
- '**.py'
- 'src/*_do'
- 'tests/**'
- 'interposer/interposer.c'
- 'interposer/libinterposer.so'
- '.github/workflows/pythonapp.yml'
pull_request:
paths:
- '**.py'
- 'src/*_do'
- 'tests/**'
- 'interposer/interposer.c'
- 'interposer/libinterposer.so'
- '.github/workflows/pythonapp.yml'
jobs:
test:
# continue-on-error: true
strategy:
fail-fast: false
matrix:
ki_release: [ki5, ki6, ki7, ki8]
w_tests: [interposer, no_interposer]
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad_auto_test:${{ matrix.ki_release }}
steps:
- uses: actions/checkout@v6
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --statistics
- name: Test ${{ matrix.ki_release }}
shell: bash
run: |
if [ "${{ matrix.w_tests }}" == 'no_interposer' ]; then export KIAUTO_INTERPOSER_DISABLE=1; fi
make test_server_${{ matrix.ki_release }}
- name: Store results
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: Test_Output_${{ matrix.ki_release }}_${{ matrix.w_tests }}
path: output
# Coveralls reporter v0.6.10 support for Python is broken, the action uses the latest available
# - name: Upload Coverage
# uses: coverallsapp/github-action@v2
# with:
# flag-name: ${{ matrix.ki_release }}_${{ matrix.w_tests }}
# parallel: true
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload Coverage
# env:
# COVERALLS_DEBUG: true
# COVERALLS_FLAG_NAME: ${{ matrix.ki_release }}_${{ matrix.w_tests }}
# COVERALLS_PARALLEL: true
# COVERALLS_ENDPOINT: https://coveralls.io
# # COVERALLS_GIT_BRANCH: ${{ inputs.git-branch }}
# # COVERALLS_GIT_COMMIT: ${{ inputs.git-commit }}
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # COVERALLS_COMPARE_REF: ${{ inputs.compare-ref }}
# # COVERALLS_COMPARE_SHA: ${{ inputs.compare-sha }}
# COVERALLS_SOURCE_HEADER: github-action
# run: |
# ls -la .coverage*
# mkdir -p ~/bin/
# echo ~/bin >> $GITHUB_PATH
# ln -s `which python3-coverage` /usr/bin/coverage
# python3-coverage --version
# coverage --version
# export CURDIR=`pwd`
# cd ~/bin/
# curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/download/v0.6.9/coveralls-linux.tar.gz
# curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/download/v0.6.9/coveralls-checksums.txt
# # curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux.tar.gz
# # curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt
# cat coveralls-checksums.txt | grep coveralls-linux.tar.gz | sha256sum --check
# tar -xzf coveralls-linux.tar.gz
# rm coveralls-checksums.txt
# ls -la ~/bin/
# cd ${CURDIR}
# ~/bin/coveralls report --debug --format python .coverage
# - name: Upload Coverage
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# COVERALLS_FLAG_NAME: ${{ matrix.ki_release }}_${{ matrix.w_tests }}
# COVERALLS_PARALLEL: true
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# # apt-get update
# # apt-get -y install python3-pip
# # pip3 install coveralls
# #coveralls --service=github
# #echo Disabled by now
# coveralls
#
# 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"