Skip to content

Commit ef5f3c8

Browse files
committed
workflow updates
1 parent fb82b1a commit ef5f3c8

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,42 @@
11
name: Run Tests
2-
32
on:
43
pull_request:
54
branches: [main]
6-
75
jobs:
86
test:
97
runs-on: ubuntu-latest
10-
118
steps:
129
- uses: actions/checkout@v2
13-
1410
- name: Set up Python
1511
uses: actions/setup-python@v2
1612
with:
1713
python-version: 3.9
18-
1914
- name: Install Poetry
2015
run: |
2116
curl -sSL https://install.python-poetry.org | python3 -
22-
2317
- name: Configure Poetry
2418
run: |
2519
echo "$HOME/.local/bin" >> $GITHUB_PATH
2620
poetry config virtualenvs.in-project true
27-
2821
- name: Set up cache
2922
uses: actions/cache@v2
3023
with:
3124
path: .venv
3225
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33-
3426
- name: Install dependencies
3527
run: |
3628
poetry install
37-
3829
- name: Run tests with coverage
3930
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
4237
- name: Generate coverage report
4338
run: |
44-
poetry run coverage
45-
39+
poetry run coverage html
4640
- name: Upload coverage report
4741
uses: actions/upload-artifact@v2
4842
with:

0 commit comments

Comments
 (0)