File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
1
name : Run Tests
2
-
3
2
on :
4
3
pull_request :
5
4
branches : [main]
6
-
7
5
jobs :
8
6
test :
9
7
runs-on : ubuntu-latest
10
-
11
8
steps :
12
9
- uses : actions/checkout@v2
13
-
14
10
- name : Set up Python
15
11
uses : actions/setup-python@v2
16
12
with :
17
13
python-version : 3.9
18
-
19
14
- name : Install Poetry
20
15
run : |
21
16
curl -sSL https://install.python-poetry.org | python3 -
22
-
23
17
- name : Configure Poetry
24
18
run : |
25
19
echo "$HOME/.local/bin" >> $GITHUB_PATH
26
20
poetry config virtualenvs.in-project true
27
-
28
21
- name : Set up cache
29
22
uses : actions/cache@v2
30
23
with :
31
24
path : .venv
32
25
key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33
-
34
26
- name : Install dependencies
35
27
run : |
36
28
poetry install
37
-
38
29
- name : Run tests with coverage
39
30
run : |
40
- poetry run test
41
-
31
+ poetry run pytest --cov=langdspy --cov-report=html tests/
32
+ - name : Check test results
33
+ if : failure()
34
+ run : |
35
+ echo "Tests failed. Please fix the failing tests."
36
+ exit 1
42
37
- name : Generate coverage report
43
38
run : |
44
- poetry run coverage
45
-
39
+ poetry run coverage html
46
40
- name : Upload coverage report
47
41
uses : actions/upload-artifact@v2
48
42
with :
You can’t perform that action at this time.
0 commit comments