File: continuous-integration.yml

package info (click to toggle)
isort 8.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,404 kB
  • sloc: python: 14,876; javascript: 42; makefile: 28; sh: 21
file content (103 lines) | stat: -rw-r--r-- 2,151 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
name: CI

"on":
  push:
  pull_request:

permissions:
  contents: read

env:
  DEFAULT_PYTHON: "3.14"

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest

    steps:
      - &checkout
        name: Check out the repository
        uses: actions/checkout@v6
        with:
          fetch-depth: 2

      - &setup-python
        name: Set up Python ${{ env.DEFAULT_PYTHON }}
        uses: actions/setup-python@v6.0.0
        with:
          python-version: ${{ env.DEFAULT_PYTHON }}
          check-latest: true

      - &setup-uv
        name: Install UV
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: true
          version-file: "pyproject.toml"

      - &install-dependencies
        name: Install dependencies
        run: uv sync --all-extras --frozen

      - name: Lint
        run: uv run --with tox-uv tox -e lint

  build:
    if: github.repository_owner == 'PyCQA'
    name: Build
    runs-on: ubuntu-latest
    
    steps:
      - *checkout
      - *setup-python
      - *setup-uv

      - name: Build package
        run: uv build

  test:
    name: Tests
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    env:
      FORCE_COLOR: 1

    steps:
      - *checkout
     
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
          allow-prereleases: true
          check-latest: true

      - *setup-uv
      - *install-dependencies

      - name: Run tests
        run: uv run --with tox-uv tox -e py,coverage_report-ci

      - name: Report Coverage
        if: matrix.os == 'ubuntu-latest' && matrix.python-version == ${{ env.DEFAULT_PYTHON }}
        uses: codecov/codecov-action@v5


  integration:
    name: Integration tests
    runs-on: ubuntu-latest

    steps:
      - *checkout
      - *setup-python
      - *setup-uv
      - *install-dependencies

      - name: Test integration
        run: ./scripts/test_integration.sh