Debian Codegraph @

.github/workflows/tests.yaml

raw
1 ---
2 name: tests
3 on:
4 push:
5 branches:
6 - main
7 - '*.*.*'
8 paths-ignore:
9 - '**.rst'
10 pull_request:
11 branches:
12 - main
13 - '*.*.*'
14 paths-ignore:
15 - '**.rst'
16 jobs:
17 test:
18 strategy:
19 fail-fast: true
20 matrix:
21 os: [ "ubuntu-latest" ]
22 python-version: [ "3.9", "3.10", "3.11" ]
23 runs-on: ${{ matrix.os }}
24 steps:
25 - name: Check out repository
26 uses: actions/checkout@v4
27 - name: Set up python ${{ matrix.python-version }}
28 id: setup-python
29 uses: actions/setup-python@v5
30 with:
31 python-version: ${{ matrix.python-version }}
32 - name: Install Poetry
33 uses: snok/install-poetry@v1
34 with:
35 virtualenvs-create: true
36 virtualenvs-in-project: true
37 - name: Load cached venv
38 id: cached-poetry-dependencies
39 uses: actions/cache@v4
40 with:
41 path: .venv
42 key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
43 - name: Install dependencies
44 if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
45 run: poetry install --no-interaction --no-root
46 - name: Install library
47 run: poetry install --no-interaction
48 - name: Run tests
49 run: |
50 source .venv/bin/activate
51 pytest --cov=aioimaplib
52 coverage report