File: ci.yml

package info (click to toggle)
python-xknx 3.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,064 kB
  • sloc: python: 40,895; javascript: 8,556; makefile: 32; sh: 12
file content (96 lines) | stat: -rw-r--r-- 2,723 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
name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - "**" # run on all branches

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - python-version: "3.10"
            os: ubuntu-latest
            envlist: "py310"
          - python-version: "3.11"
            os: ubuntu-latest
            envlist: "py311"
          - python-version: "3.12"
            os: ubuntu-latest
            envlist: "py312"
          - python-version: "3.13"
            os: ubuntu-latest
            envlist: "py313"
          - python-version: "3.14"
            os: ubuntu-latest
            envlist: "py314,ruff,typing,lint,pylint"

          - python-version: "3.13"
            os: macos-14
            envlist: "py313"

          - python-version: "3.13"
            os: windows-latest
            envlist: "py313"
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
          cache: "pip"
          cache-dependency-path: |
            requirements/production.txt
            requirements/testing.txt
            .pre-commit-config.yaml
      - name: Install dependencies
        run: |
          pip install -r requirements/testing.txt
      - name: CI
        run: |
          tox run -e "${{ matrix.envlist }}"
      - name: Upload coverage artifact
        uses: actions/upload-artifact@v6
        with:
          name: coverage-${{ matrix.os }}-${{ matrix.python-version }}
          path: .coverage
          include-hidden-files: true

  coverage:
    name: Process test coverage
    runs-on: ubuntu-latest
    needs: ["build"]
    strategy:
      matrix:
        python-version: ["3.14"]
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
          cache: "pip"
          cache-dependency-path: |
            requirements/production.txt
            requirements/testing.txt
            .pre-commit-config.yaml
      - name: Install coverage.py
        run: pip install coverage
      - name: Download all coverage artifacts
        uses: actions/download-artifact@v7
      - name: Create coverage report
        run: |
          coverage combine coverage-*/.coverage
          coverage report --fail-under=94
          coverage xml
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v5
        with:
          fail_ci_if_error: true
          token: ${{ secrets.CODECOV_TOKEN }}