-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.22 KB
/
test.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: Test
on: [push, pull_request]
jobs:
pre-commit:
name: Run pre-commit check
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install using Pip
run: python -m pip install pre-commit
- name: Install pre-commit hook
run: pre-commit install
- name: Run pre-commit checks
run: pre-commit run --verbose --all-files
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Update ubuntu
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends git gcc python3-dev
- name: Checkout the repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install pytest
run: pip3 install pytest==5.4.3
- name: Install Poetry
uses: snok/[email protected]
- name: Install project
working-directory: .
run: poetry install
- name: Run test suite
run: poetry run pytest --color=yes --verbose --showlocals tests