generated from FUMR/template-python
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (31 loc) · 944 Bytes
/
tests.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
41
42
43
name: Tests
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
pytest:
name: PyTest
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.7', '3.8', '3.9', 'pypy-3.7' ]
exclude:
- os: macos-latest
python-version: 'pypy-3.7'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v4
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ matrix.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('pyproject.toml') }}
- run: sudo apt-get install -y libxml2-dev libxslt-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: poetry install
- run: poetry run pytest