Skip to content

Commit

Permalink
Merge pull request #1898 from hydephp/optimize-test-suite
Browse files Browse the repository at this point in the history
Internal: Optimize test suite
  • Loading branch information
caendesilva authored Jul 24, 2024
2 parents b8db343 + 3484dc9 commit b6f0142
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🔥 Coverage Tests
name: 🧪 Coverage Tests

on:
pull_request:
Expand Down Expand Up @@ -41,4 +41,4 @@ jobs:
- name: Ping statistics server with test results
run: |
curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
php ping.php "Monorepo Smoke Tests - Coverage" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}
php ping.php "Monorepo Coverage Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ jobs:
path: '_media/app.css'


visual-regression-testing:
visual-regression-tests:
runs-on: ubuntu-latest
needs: dusk-browser-tests
# if: (! github.event.pull_request.draft)
if: contains(github.event.pull_request.labels.*.name, 'run-visual-tests') || github.event_name == 'push'
steps:
- name: Download Dusk generated pages
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/matrix-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Matrix Tests

on:
pull_request:
branches: [ "master" ]
paths:
- 'app/**'
- 'packages/**'
- 'resources/**'
- 'tests/**'
- 'config/**'
- '.github/workflows/matrix-tests.yml'
- '*.*'

jobs:

test-matrix:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
php: [8.1, 8.2, 8.3]
runs-on: ${{ matrix.os }}

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo, zip
- uses: actions/checkout@v4

- name: Install Composer Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/pest --log-junit report.xml

- name: Ping statistics server with test results
run: |
curl https://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
php ping.php "Monorepo PR Matrix" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}
78 changes: 0 additions & 78 deletions .github/workflows/test-pull-requests.yml

This file was deleted.

0 comments on commit b6f0142

Please sign in to comment.