Debian Codegraph @

.github/workflows/test.yml

raw
1 name: Test
2
3 on: [push, pull_request]
4
5 permissions:
6 contents: read
7
8 jobs:
9 test:
10 runs-on: ubuntu-latest
11 strategy:
12 matrix:
13 python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
14 steps:
15 - uses: actions/checkout@v7
16 - name: Set up Python ${{ matrix.python-version }}
17 uses: actions/setup-python@v7
18 with:
19 python-version: ${{ matrix.python-version }}
20 - uses: actions/cache@v6
21 name: Configure pip caching
22 with:
23 path: ~/.cache/pip
24 key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
25 restore-keys: |
26 ${{ runner.os }}-pip-
27 - name: Build extension for --load-extension test
28 run: |-
29 (cd tests && gcc ext.c -fPIC -shared -o ext.so)
30 - name: Install dependencies
31 run: |
32 pip install -e '.[test]'
33 pip freeze
34 - name: Run tests
35 run: |
36 pytest -n auto -m "not serial"
37 pytest -m "serial"
38 # And the test that exceeds a localhost HTTPS server
39 tests/test_datasette_https_server.sh
40 - name: Check if cog needs to be run
41 run: |
42 cog --check docs/*.rst
43 - name: Check if blacken-docs needs to be run
44 run: |
45 # This fails on syntax errors, or a diff was applied
46 blacken-docs -l 60 docs/*.rst