Repository navigation
82 lines (81 loc) · 2.58 KB
/
Copy pathtest.yaml
File metadata and controls
82 lines (81 loc) · 2.58 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
name: test
on:
push:
branches:
- "main"
- "feature/**"
- "copilot/**"
pull_request:
branches:
- "main"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version:
- "3.12"
- "3.13"
- "3.14"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up uv with caching enabled
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
enable-cache: true
version: "0.12.19"
python-version: ${{ matrix.python-version }}
- name: Install actionlint
if: matrix.python-version == '3.13'
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p "$RUNNER_TEMP/actionlint"
gh release download v1.7.12 --repo rhysd/actionlint \
--pattern 'actionlint_1.7.12_linux_amd64.tar.gz' \
--pattern 'actionlint_1.7.12_checksums.txt' \
--dir "$RUNNER_TEMP/actionlint"
(cd "$RUNNER_TEMP/actionlint" && sha256sum -c --ignore-missing actionlint_1.7.12_checksums.txt)
tar -xzf "$RUNNER_TEMP/actionlint/actionlint_1.7.12_linux_amd64.tar.gz" -C "$RUNNER_TEMP/actionlint" actionlint
echo "$RUNNER_TEMP/actionlint" >> "$GITHUB_PATH"
- name: Run CI tests
if: matrix.python-version == '3.13'
shell: bash
run: |
make ci-test
make ci-test-docs
- name: Run Python compatibility tests
if: matrix.python-version != '3.13'
shell: bash
run: |
uv sync --locked --no-dev --group test
uv run --locked --no-dev --group test pytest
hooks:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up uv with caching enabled
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
enable-cache: true
version: "0.12.19"
python-version: "3.13"
- name: Set up Python 3.13
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Run configured hooks
run: make hooks-check