summaryrefslogtreecommitdiffstats
path: root/.github/workflows/python-package-ci.yml
blob: b3b884cc19b11abf489ea40bda6bce3560d9b684 (plain) (blame)
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: python package ci

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        versions: [
          {python: '3.6', poetry: '1.1.15'},
          {python: '3.7', poetry: '1.2.2'},
          {python: '3.8', poetry: '1.2.2'},
          {python: '3.9', poetry: '1.2.2'},
          {python: '3.10', poetry: '1.2.2'},
          {python: '3.11', poetry: '1.2.2'},
          {python: '3.12', poetry: '1.2.2'},
          {python: '3.13', poetry: '1.2.2'},
        ]

    steps:
      - uses: actions/checkout@v3

      - name: Set up Poetry
        run: pipx install poetry==${{ matrix.versions.poetry }}

      - name: Set up Python ${{ matrix.versions.python }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.versions.python }}
          cache: 'poetry'

      - name: Install Dependencies
        run: |
          poetry install -v
          poetry run pip install -r requirements-311.txt

      - name: Install system LIRC
        run: sudo apt-get install lirc

      - name: Run tests
        run: poetry run pytest -v tests/ --cov=lirc/ --cov-report=xml

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          file: ./coverage.xml
          flags: unittests
          name: codecov-umbrella
          fail_ci_if_error: true

      - name: Build Package
        run: poetry build