-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 877 Bytes
/
pytest.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
# test API backend with pytest
name: Pytest and Unittest
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-linters:
name: Run pytest and unittest
runs-on: ubuntu-latest
env:
HF_BEARER_TOKEN: ${{ secrets.HF_BEARER_TOKEN }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.10.10
- name: Pip install
working-directory: backend
run: pip install -r requirements.txt
- name: Run pytest
working-directory: backend/tests
run: pytest test.py -v
- name: Run unittest
working-directory: backend/anonymizer
run: python test.py