Skip to content

Commit 3fd1764

Browse files
Introduce CI via automated tests
1 parent 82bb87a commit 3fd1764

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
id: cp312
21+
with:
22+
python-version-file: ".python-version"
23+
cache: "pip"
24+
cache-dependency-path: "requirements-test.txt"
25+
26+
# for testing
27+
- name: Check cache hit
28+
run: echo "${{ steps.cp312.outputs.cache-hit }}" # true if cache-hit occurred on the primary key
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install -r requirements-test.txt
34+
35+
- name: Run tests
36+
run: |
37+
pytest --disable-warnings -q -rA

0 commit comments

Comments
 (0)