-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (73 loc) · 2.13 KB
/
Copy pathtest.yml
File metadata and controls
81 lines (73 loc) · 2.13 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
### A CI workflow template that runs linting and python testing
### TODO: Modify as needed or as desired.
name: Test tap-trentinopvgis
on:
push:
branches: [main]
paths:
- .github/workflows/test.yml
- tap_trentinopvgis/**
- tests/**
- pyproject.toml
- uv.lock
pull_request:
paths:
- .github/workflows/test.yml
- tap_trentinopvgis/**
- tests/**
- pyproject.toml
- uv.lock
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
permissions:
contents: read # read repository contents
jobs:
build-package:
name: Build & verify package
runs-on: ubuntu-latest
outputs:
supported-python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0
id: baipp
pytest:
name: Test
needs: [build-package]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ${{ fromJson(needs.build-package.outputs.supported-python-versions) }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Run Tox
run: | # zizmor: ignore[template-injection]
uvx --with=tox-uv tox -e ${{ matrix.python-version }}
typing:
name: Type Checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Run Tox
run: >
uvx
--managed-python
--with=tox-uv
tox -e typing