Skip to content

Commit

Permalink
CI: Show color output on pytest logs in GitHub Actions
Browse files Browse the repository at this point in the history
GitHub Actions does not show colour outputs for pytest by default (pytest-dev/pytest#7443), but it can be enabled using `--color=yes` flag.
  • Loading branch information
weiji14 committed Jul 16, 2024
1 parent 97a6f30 commit 9e0eada
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:

# Run the regular tests
- name: Run tests
run: make test PYTEST_EXTRA="-r P -n auto --reruns 2"
run: make test PYTEST_EXTRA="-r P -n auto --reruns 2 --color=yes"

# Upload diff images on test failure
- name: Upload diff images if any test fails
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:

# Run the tests
- name: Test with pytest
run: make test PYTEST_EXTRA="-r P -n auto --reruns 2"
run: make test PYTEST_EXTRA="-r P -n auto --reruns 2 --color=yes"
env:
GMT_LIBRARY_PATH: ${{ runner.temp }}/gmt-install-dir/lib

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ jobs:

# Run the tests but skip images
- name: Run tests
run: make test_no_images PYTEST_EXTRA="-r P"
run: make test_no_images PYTEST_EXTRA="-r P --color=yes"

0 comments on commit 9e0eada

Please sign in to comment.