File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Tests
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ pull_request :
7
+ branches : [main]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-24.04
12
+ permissions :
13
+ contents : read
14
+
15
+ steps :
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v4
21
+ with :
22
+ python-version-file : .python-version
23
+
24
+ - name : Install Poetry
25
+ uses : snok/install-poetry@v1
26
+ with :
27
+ virtualenvs-create : true
28
+ virtualenvs-in-project : true
29
+ virtualenvs-path : .venv
30
+ installer-parallel : true
31
+
32
+ - name : Load cached venv
33
+ id : cached-poetry-dependencies
34
+ uses : actions/cache@v4
35
+ with :
36
+ path : .venv
37
+ key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
38
+
39
+ - name : Install dependencies
40
+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
41
+ run : poetry install --no-interaction --no-root
42
+
43
+ - name : Install project
44
+ run : poetry install --no-interaction
45
+
46
+ - name : Run tests
47
+ run : |
48
+ source .venv/bin/activate
49
+ pytest tests/
50
+ coverage report
You can’t perform that action at this time.
0 commit comments