-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (52 loc) · 1.63 KB
/
checks_and_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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Quality Checks and Tests
on:
push:
pull_request:
branches: [ main ]
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout Code Repository
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.8
virtualenvs-create: false
- name: Install Project Dependencies
run: poetry install --no-interaction --no-root
- name: Check Adhere to Black
run: black . --check --verbose
- name: Mypy Typing Check
run: mypy
- name: Isort Import Sorting Check
run: isort . --check --diff
- name: Flake8 Check
run: flake8
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code Repository
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.8
virtualenvs-create: false
- name: Install Project Dependencies
run: poetry install --no-interaction --no-root
- name: Run Unit Tests
run: python -m unittest discover tests/unit --verbose
- name: Run Integration Tests
run: python -m unittest discover tests/integration --verbose