Skip to content

Commit

Permalink
Run tests including the skipped ones each Thursday night
Browse files Browse the repository at this point in the history
  • Loading branch information
spaze committed Oct 16, 2023
1 parent cf0a18e commit 522660c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/php-tester-include-skipped.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PHP tests, including skipped tests

on:
schedule:
- cron: '45 23 * * 4'
workflow_dispatch:

jobs:
tester-include-skipped:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "8.2"
- "8.3"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: pcov
php-version: ${{ matrix.php-version }}
- name: Create symlink in /srv/www
run: |
sudo mkdir --parents /srv/www
sudo ln --symbolic $GITHUB_WORKSPACE /srv/www
- run: make --directory=site tester-include-skipped
- name: Failed test output, if any
if: failure()
run: for i in $(find ./site/tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
- name: Upload test code coverage
uses: actions/upload-artifact@v3
if: success()
with:
name: Test code coverage (PHP ${{ matrix.php-version }})
path: 'site/temp/coverage.html'
retention-days: 5
6 changes: 5 additions & 1 deletion site/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test audit cs-fix check-file-patterns check-makefile lint-php lint-latte lint-neon lint-xml lint-xml-auto-install phpcs phpstan phpstan-latte-templates phpstan-vendor psalm tester
.PHONY: test audit cs-fix check-file-patterns check-makefile lint-php lint-latte lint-neon lint-xml lint-xml-auto-install phpcs phpstan phpstan-latte-templates phpstan-vendor psalm tester tester-include-skipped

test: audit check-file-patterns check-makefile lint-php lint-latte lint-neon lint-xml phpcs phpstan tester psalm phpstan-vendor

Expand Down Expand Up @@ -46,3 +46,7 @@ psalm:

tester:
vendor/nette/tester/src/tester -s -c tests/php-unix.ini --colors 1 --coverage temp/coverage.html --coverage-src app/ tests/

tester-include-skipped:
TEST_CASE_RUNNER_INCLUDE_SKIPPED=1 \
$(MAKE) tester

0 comments on commit 522660c

Please sign in to comment.