-
Notifications
You must be signed in to change notification settings - Fork 23
43 lines (38 loc) · 1007 Bytes
/
run-tests.yaml
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: Run Tests
on:
# tests can be called from other workflows
workflow_call:
# always run tests for every push to master
push:
branches: [master]
# always run tests for every PR
pull_request:
branches: [master]
jobs:
pre-commit:
name: Run code checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- uses: pre-commit/[email protected]
unittest:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1
- name: Install dependencies
run: poetry install --no-dev
- name: Run unit tests
run: poetry run python -m unittest discover