-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (73 loc) · 2.27 KB
/
pull-python-luxos.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: LuxOS Pull-Request
on:
pull_request:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
PACKAGE: luxos
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Set up runner
run: echo noop
- name: Checkout
uses: actions/checkout@v4.1.0
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Python toolchain
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Python dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: Run Python checks (ruff)
shell: bash
env:
PYTHONPATH: src
run: |
ruff check src tests
- name: Run Python checks (mypy)
shell: bash
env:
PYTHONPATH: src
OUTDIR: build/qa-${{ matrix.python-version }}-${{ matrix.os}}
run: |
mypy src \
--no-incremental --xslt-html-report $OUTDIR/mypy
- name: Run Python checks
shell: bash
env:
PYTHONPATH: src
OUTDIR: build/qa-${{ matrix.python-version }}-${{ matrix.os}}
run: |
py.test \
--cov=${{ env.PACKAGE }} \
--cov-report=html:$OUTDIR/coverage --cov-report=xml:$OUTDIR/coverage.xml \
--junitxml=$OUTDIR/junit/junit.xml --html=$OUTDIR/junit/junit.html --self-contained-html \
tests
- name: Build wheel packages
if: ${{ ! contains(matrix.os, 'windows') }}
env:
GITHUB_DUMP: ${{ toJson(github) }}
run: |
python -m build
touch .keepme
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: qa-results-${{ matrix.python-version }}-${{ matrix.os }}
path: |
build/qa-${{ matrix.python-version }}-${{ matrix.os}}
dist
.keepme
# Use always() to always run this step to publish test results when there are test failures
if: always()