File: ci.yaml

package info (click to toggle)
python-awair 0.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,088 kB
  • sloc: python: 1,091; makefile: 12
file content (54 lines) | stat: -rw-r--r-- 1,592 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
name: CI
on:
  pull_request:
  workflow_dispatch:
  push:
    branches: [master]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
        include:
          - python-version: 3.9
            toxenv: py39
          - python-version: "3.10"
            toxenv: py310
          - python-version: "3.11"
            toxenv: py311
          - python-version: "3.12"
            toxenv: py312
          - python-version: "3.13"
            toxenv: py313
    steps:
      - name: Checkout
        uses: actions/checkout@v5
      - name: Set up python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
      - name: Set up poetry
        uses: Gr1N/setup-poetry@v9
      - name: Cache dependencies
        uses: actions/cache@v4
        with:
          path: ~/.cache/pypoetry/virtualenvs
          key: ${{ runner.os }}-v2-poetry-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
          restore-keys: |
            ${{ runner.os }}-v2-poetry-${{ matrix.python-version }}
      - name: Install dependencies
        run: poetry install
      - name: Tests
        run: |
          poetry run tox -e ${{ matrix.toxenv }}
      - name: Linters
        run: |
          poetry run tox -e lint
        if: matrix.python-version == '3.9'
      - name: Coverage
        run: |
          poetry run tox -e coverage
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        if: matrix.python-version == '3.9'