-
-
Notifications
You must be signed in to change notification settings - Fork 13
37 lines (37 loc) · 1.15 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
name: pytest
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
poetry-version: ["1.2.2"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Cache ~/.cache/pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: python-${{ steps.setup-python.outputs.python-version }}
- name: Cache ~/.cache/pypoetry
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: python-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Poetry install
run: poetry install
- name: Poetry run pytest
# See https://github.com/gevent/gevent/issues/1016
run: poetry run pytest-gevent