-
Notifications
You must be signed in to change notification settings - Fork 39
45 lines (39 loc) · 1.02 KB
/
run-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
name: Run tests
on:
push:
branches: ["development", "main"]
pull_request:
branches: ["development", "main"]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python3 -m ensurepip --upgrade
pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt
- name: Lint with pre-commit hook
run: |
pre-commit run --all-files --show-diff-on-failure
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python3 -m ensurepip --upgrade
pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt
- name: Test with pytest
run: |
pytest tests