Skip to content

Commit

Permalink
Add summary only option - Fail a test intentionally
Browse files Browse the repository at this point in the history
  • Loading branch information
faboshka committed Jan 5, 2024
1 parent f386d09 commit 39f3832
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.12']
Expand All @@ -24,8 +25,13 @@ jobs:
- name: Install poetry
run: python -m pip install poetry
- name: Install dependencies
run: poetry install --only main,test
run: |
poetry add pytest-github-actions-annotate-failures@latest --group=test
poetry install --only main,test
- name: Run tests
env:
PYTEST_RUN_PATH: tests
GITHUB_ACTIONS: true
run: poetry run pytest tests --junitxml=junit.xml -n auto
- name: Test reporter
uses: phoenix-actions/test-reporting@v12
Expand All @@ -35,3 +41,5 @@ jobs:
path: junit.xml
reporter: java-junit
output-to: step-summary
only-summary: true
max-annotations: 0
1 change: 1 addition & 0 deletions tests/test_secret_santa.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ def test_init_defaults(
monkeypatch: MonkeyPatch,
project_root_directory: Path,
) -> None:
assert False
monkeypatch.setenv(TWILIO_ACCOUNT_SID, "DummyTwilioAccountSIDValue")
monkeypatch.setenv(TWILIO_AUTH_TOKEN, "DummyTwilioAuthToken")
monkeypatch.setenv(TWILIO_NUMBER, "+1234567890")
Expand Down

0 comments on commit 39f3832

Please sign in to comment.