-
Notifications
You must be signed in to change notification settings - Fork 24
62 lines (51 loc) · 1.76 KB
/
python-ci.yml
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
# This workflow will install Python dependencies, run tests and other codechecks on SPSDK project
name: Python Continous Integration
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
permissions:
contents: read
jobs:
codecheck:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.12"]
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set-up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Install OS Dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update && sudo apt install -y libpcsclite-dev swig
fi
if [ "$RUNNER_OS" == "macOS" ]; then
brew install pcsc-lite swig
fi
shell: bash
- name: Install SPSDK
run: |
python -m pip install --upgrade pip
pip install --upgrade .[all]
- name: Install Development Dependencies
run: |
pip install -r requirements-develop.txt
- name: Run Codecheck
run: |
# Ignoring the 'COPYRIGHT' check as the year of merge to Github may differ from the actual year when the file was updated
codecheck -s --output reports_codecheck --info-check gitcov --info-check COPYRIGHT
- name: Archive Results
uses: actions/upload-artifact@v3
with:
name: Results-${{ matrix.python-version }}-${{ matrix.os }}
path: reports_codecheck
if: always() && job.status == 'failure'