File: ci.yml

package info (click to toggle)
pytest-codspeed 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,608 kB
  • sloc: ansic: 9,792; python: 2,066; sh: 41; makefile: 14
file content (87 lines) | stat: -rw-r--r-- 2,325 bytes parent folder | download
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
83
84
85
86
87
name: CI
on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
  workflow_dispatch:

concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  static-analysis:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
      - name: Set up Python 3.14
        uses: actions/setup-python@v5
        with:
          python-version: "3.14"
      - uses: pre-commit/action@v3.0.1
        with:
          extra_args: --all-files

  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        config:
          - headless
          - pytest-benchmark-4
          - pytest-benchmark-5
          - valgrind
        python-version:
          - "3.9"
          - "3.10"
          - "3.11"
          - "3.12"
          - "3.13"
          - "3.14"
        pytest-version:
          - ">=8.1.1"

    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
      - uses: astral-sh/setup-uv@v4
        with:
          version: "0.5.20"
      - name: "Set up Python ${{ matrix.python-version }}"
        uses: actions/setup-python@v5
        with:
          python-version: "${{ matrix.python-version }}"
      - if: matrix.config == 'valgrind' || matrix.config == 'pytest-benchmark'
        name: Install valgrind
        run: |
          sudo apt-get update
          sudo apt-get install valgrind -y
      - name: Install dependencies with pytest${{ matrix.pytest-version }}
        run: |
          if [ "${{ matrix.config }}" == "valgrind" ]; then
            export PYTEST_CODSPEED_FORCE_EXTENSION_BUILD=1
          fi
          uv sync --all-extras --dev --locked --verbose
          uv pip install "pytest${{ matrix.pytest-version }}"
          uv pip uninstall pytest-benchmark
      - if: matrix.config == 'pytest-benchmark-4'
        name: Install pytest-benchmark 4.0.0
        run: uv pip install pytest-benchmark~=4.0.0
      - if: matrix.config == 'pytest-benchmark-5'
        name: Install pytest-benchmark 5.0.0
        run: uv pip install pytest-benchmark~=5.0.0
      - name: Run tests
        run: uv run --no-sync pytest -vs

  all-checks:
    runs-on: ubuntu-latest
    steps:
      - run: echo "All CI checks passed."
    needs:
      - static-analysis
      - tests