Skip to content

Commit e2ba9b1

Browse files
committed
✨ chore: Refactor GitHub Actions workflow for pytest execution
- Simplified the pytest command in the workflow by removing the `cd` command and using the `working-directory` attribute. - Enhanced readability of the pytest command by formatting it across multiple lines, improving maintainability.
1 parent 1fb4519 commit e2ba9b1

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/lint-and-test.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,20 @@ jobs:
4343
uv run ruff --config=pyproject.toml check yet_another_calendar
4444
uv run mypy --config-file=pyproject.toml yet_another_calendar
4545
46+
# - name: Run tests
47+
# run: |
48+
# cd backend
49+
# YET_ANOTHER_CALENDAR_TUTOR_SECRET_KEY='test' uv run pytest --junitxml=../pytest.xml --cov-report=term-missing:skip-covered --cov-fail-under=80 --cov=yet_another_calendar/web yet_another_calendar/tests/* | tee ../pytest-coverage.txt
4650
- name: Run tests
51+
working-directory: backend
4752
run: |
48-
cd backend
49-
YET_ANOTHER_CALENDAR_TUTOR_SECRET_KEY='test' uv run pytest --junitxml=../pytest.xml --cov-report=term-missing:skip-covered --cov-fail-under=80 --cov=yet_another_calendar/web yet_another_calendar/tests/* | tee ../pytest-coverage.txt
50-
53+
YET_ANOTHER_CALENDAR_TUTOR_SECRET_KEY='test' \
54+
uv run pytest --junitxml=../pytest.xml \
55+
--cov-report=term-missing:skip-covered \
56+
--cov-fail-under=80 \
57+
--cov=yet_another_calendar/web \
58+
yet_another_calendar/tests/* | tee ../pytest-coverage.txt
59+
5160
- name: Pytest coverage comment
5261
id: coverage
5362
uses: MishaKav/pytest-coverage-comment@main

0 commit comments

Comments
 (0)