-
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (85 loc) · 2.45 KB
/
test.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
87
88
89
90
91
92
93
94
95
96
97
98
name: Test template output
on:
pull_request:
paths:
- src/**
- noxfile.py
- .github/workflows/test.yml
- .github/workflows/constraints.txt
- copier.yml
push:
branches:
- 'main'
paths:
- src/**
- noxfile.py
- .github/workflows/test.yml
- .github/workflows/constraints.txt
- copier.yml
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: "1"
jobs:
linting:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
visibility: ["private", "public"]
stream_type: ["REST", "GraphQL"]
auth_method:
- "API Key"
- "Bearer Token"
- "Basic Auth"
- "OAuth2"
- "JWT"
- "Custom or N/A"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v3
- name: Install copier
env:
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
uv tool install copier
copier --version
- name: Install Hatch
env:
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
uv tool install hatch
hatch --version
- name: Install Nox
env:
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
uv tool install nox
nox --version
- name: Install pre-commit
env:
UV_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
uv tool install pre-commit --with pre-commit-uv
pre-commit --version
- name: Install dependencies
run: >
nox
--install-only
-s "lint-${{ matrix.python-version }}(visibility='${{ matrix.visibility }}', auth_method='${{ matrix.auth_method }}', stream_type='${{ matrix.stream_type }}')"
- name: Run Nox
env:
PYTHONWARNINGS: "all,error::DeprecationWarning,ignore::DeprecationWarning:setuptools_scm._get_version_impl"
run: >
nox
--reuse-existing-virtualenvs
--no-install
-s "lint-${{ matrix.python-version }}(visibility='${{ matrix.visibility }}', auth_method='${{ matrix.auth_method }}', stream_type='${{ matrix.stream_type }}')"