Repository navigation
61 lines (56 loc) · 2.03 KB
/
Copy pathpythonapp.yml
File metadata and controls
61 lines (56 loc) · 2.03 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
name: Python application
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
- run: uv run ruff format --check .
- run: uv run ruff check .
- name: Audit workflows (zizmor)
env:
GH_TOKEN: ${{ github.token }} # enables online audits (known-vulnerable-actions, impostor-commit)
run: uv run zizmor --format=github .
- run: uv run mypy
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15']
markdown: ['locked']
include:
# Lowest supported Markdown (pyproject: Markdown>=3.2). Overrides the
# `markdown` axis value, so this becomes an extra job instead of
# being merged into the py3.10 one.
- python-version: '3.10'
markdown: '3.2.*'
name: test (py${{ matrix.python-version }}${{ matrix.markdown != 'locked' && format(', markdown {0}', matrix.markdown) || '' }})
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
python-version: ${{ matrix.python-version }}
- name: Test
if: ${{ matrix.markdown == 'locked' }}
run: uv run pytest -v --cov
- name: Test with lowest Markdown
if: ${{ matrix.markdown != 'locked' }}
run: uv run --isolated --with "markdown==${{ matrix.markdown }}" pytest -v
# Single stable check name for the branch ruleset, independent of the matrix
ci-ok:
if: always()
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- run: test "${{ needs.lint.result }}" = success && test "${{ needs.test.result }}" = success