-
Notifications
You must be signed in to change notification settings - Fork 71
33 lines (31 loc) · 1008 Bytes
/
tests.yaml
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
---
name: Test Python package
on: [pull_request, push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
pytest-version: [4, 5, 6, 7, 8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies, pytest ${{ matrix.pytest-version }}
run: |
python -m pip install --upgrade pip setuptools
pip install pytest==${{ matrix.pytest-version }}
pip install ".[tests]"
- name: Build image
run: |
docker-compose -f tests/docker-compose.yml pull
docker-compose -f tests/docker-compose.yml build
- name: Run tests
run: |
pytest -c setup.cfg
- name: Stop Docker compose
run: |
docker-compose -f tests/docker-compose.yml down