Repository navigation
45 lines (41 loc) · 1.53 KB
/
Copy pathci.yml
File metadata and controls
45 lines (41 loc) · 1.53 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
# Lint and smoke-test the demo under ordinary Python. The tests check that the
# catalogue matches the routes and that the documented flaws still work, since
# a demo whose injection stopped working would show nothing.
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- run: python -m pip install ruff==0.14.0
# Syntax errors and undefined names only: the insecure patterns are the
# point of this app, so security rules would flag every route by design.
- run: ruff check --select E9,F63,F7,F82 .
test:
# Pinned: ubuntu-latest is now 26.04, and setup-python has no 3.9 build
# for it. 24.04 carries all three versions in the matrix.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.12", "3.13"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -r requirements.txt pytest
- run: python -m pytest -q -p no:cacheprovider tests/