-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (55 loc) · 1.54 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Tests
on:
pull_request:
types: [opened, reopened, synchronize]
env:
PYTHON_VERSION: 3.11
POETRY_VERSION: 1.5.1
jobs:
black:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry==${{ env.POETRY_VERSION }}
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'
- name: Install poetry dependencies
run: poetry install
- name: Run black through poetry
run: poetry run black src --check
flake8:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry==${{ env.POETRY_VERSION }}
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'
- name: Install poetry dependencies
run: poetry install
- name: Run flake8 through poetry
run: poetry run flake8
pytest:
runs-on: ubuntu-latest
name: Tests
timeout-minutes: 6
needs: [black,flake8]
steps:
- uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry==${{ env.POETRY_VERSION }}
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'
- name: Install dependencies
run: poetry install
- name: Run pytest through poetry
run: poetry run pytest