Repository navigation
83 lines (68 loc) · 2.06 KB
/
Copy pathxrepo--tester.yaml
File metadata and controls
83 lines (68 loc) · 2.06 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
name: Reusable Tester
on:
workflow_call:
inputs:
matrix-exclusions:
default: '[]'
required: false
type: string
platforms:
required: true
type: string
python-descriptors:
required: true
type: string
python-versions:
required: true
type: string
rust-targets:
default: '[]'
required: false
type: string
jobs:
lint-and-build:
runs-on: ubuntu-latest
steps:
- name: Prepare Python
uses: emcd/python-project-common/.github/actions/python-hatch@master
with:
python-version: '${{ fromJSON(inputs.python-versions)[0] }}'
- name: Install External Linters
run: |
pipx install emcd-vibe-linter
- name: Lint
run: |
hatch --env develop run linters
- name: Document
run: |
hatch --env develop run docsgen
- name: Package
run: |
hatch --env develop run packagers
test-coverage:
strategy:
matrix:
platform: ${{ fromJSON(inputs.platforms) }}
python-version: ${{ fromJSON(inputs.python-versions) }}
exclude: ${{ fromJSON(inputs.matrix-exclusions) }}
runs-on: ${{ matrix.platform }}
needs: [lint-and-build]
steps:
- name: Prepare Python
uses: emcd/python-project-common/.github/actions/python-hatch@master
with:
python-version: '${{ matrix.python-version }}'
# TODO: Setup Rust, if desired.
- name: Test
run: |
set -eu
v=${{ fromJSON(inputs.python-descriptors)[ matrix.python-version ].hatch }}
hatch --env "qa.${v}" run coverage --version
hatch --env "qa.${v}" run testers-no-reports
shell: bash
# TODO: Optional Rust testing.
- name: Preserve Coverage Results
uses: actions/upload-artifact@v7
with:
name: coverage-results--${{ matrix.platform }}--${{ matrix.python-version }}--${{ github.run_id }}
path: .auxiliary/caches/pytest/coverage.sqlite3.*