Debian Codegraph @

.github/workflows/test.yaml

raw
1 # This is a GitHub workflow defining a set of jobs with a set of steps.
2 # ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
3 #
4 name: Test
5
6 on:
7 pull_request:
8 paths-ignore:
9 - "**.md"
10 - ".github/workflows/*"
11 - "!.github/workflows/test.yaml"
12 push:
13 paths-ignore:
14 - "**.md"
15 - ".github/workflows/*"
16 - "!.github/workflows/test.yaml"
17 branches-ignore:
18 - "dependabot/**"
19 - "pre-commit-ci-update-config"
20 tags:
21 - "**"
22 workflow_dispatch:
23
24 jobs:
25 pytest:
26 runs-on: ubuntu-22.04
27
28 strategy:
29 fail-fast: false
30 matrix:
31 include:
32 - python-version: "3.10"
33 sphinx-version: "6.*"
34 traitlets-version: "4.*"
35 - python-version: "3.11"
36 sphinx-version: "7.*"
37 traitlets-version: "4.*"
38 - python-version: "3.12"
39 sphinx-version: "8.*"
40 traitlets-version: "5.*"
41 - python-version: "3.13"
42 sphinx-version: "9.*"
43 traitlets-version: ""
44 - python-version: "3.14"
45
46 steps:
47 - uses: actions/checkout@v6
48 - uses: actions/setup-python@v6
49 with:
50 python-version: "${{ matrix.python-version }}"
51
52 - name: create constraints
53 run: |
54 touch constraints.txt
55 if [[ ! -z "${{ matrix.sphinx-version }}" ]]; then
56 echo "sphinx==${{ matrix.sphinx-version }}" >> constraints.txt
57 fi
58 if [[ ! -z "${{ matrix.traitlets-version }}" ]]; then
59 echo "traitlets==${{ matrix.traitlets-version }}" >> constraints.txt
60 fi
61
62 - run: pip install ".[test]" --constraint ./constraints.txt ${{ matrix.pip-install-addition }}
63
64 - run: pytest