-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (73 loc) · 1.82 KB
/
quality-checks.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
---
name: quality-checks
on:
pull_request:
push:
branches:
- main
workflow_call:
inputs:
ref:
required: true
type: string
workflow_dispatch:
inputs:
ref:
description: A git reference to check out.
default: main
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
outputs:
python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- uses: hynek/build-and-inspect-python-package@v2
id: baipp
unit-tests:
needs: ["build"]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ${{ fromJson(needs.build.outputs.python-versions) }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: extractions/setup-just@v2
- run: pipx install hatch
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- run: |
rm -r _delb delb
test "$(find dist -name 'delb-*.whl' | wc -l)" -eq 1
export WHEEL_PATH=$(find dist -name 'delb-*.whl')
just pytest
other-quality-checks:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- code-lint
- doctest
- mypy
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: extractions/setup-just@v2
- run: pipx install hatch
- run: just ${{ matrix.target }}
...