-
Notifications
You must be signed in to change notification settings - Fork 12
40 lines (35 loc) · 1.08 KB
/
pytest.yml
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
name: Testing
on:
push:
pull_request:
# adapted from: https://github.com/tiangolo/poetry-version-plugin
jobs:
test:
strategy:
fail-fast: true
matrix:
os: [ "ubuntu-latest", "macos-latest" , "windows-latest"]
python-version: [ "3.9" ]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements/requirements-${{ matrix.os }}-${{ matrix.python-version }}.txt
- name: Install pinned requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-${{ matrix.os }}-${{ matrix.python-version }}.txt --prefer-binary
- name: Install test requirements
run: pip install .[test]
- name: Run tests
run: |
pytest tests/