|
| 1 | +name: Quicktest |
| 2 | + |
| 3 | +on: |
| 4 | + # Run on pushes to all branches except for `master`. |
| 5 | + push: |
| 6 | + branches-ignore: |
| 7 | + - master |
| 8 | + paths-ignore: |
| 9 | + - '**.md' |
| 10 | + # Allow manually triggering the workflow. |
| 11 | + workflow_dispatch: |
| 12 | + |
| 13 | +# Cancels all previous workflow runs for the same branch that have not yet completed. |
| 14 | +concurrency: |
| 15 | + # The concurrency group contains the workflow name and the branch name. |
| 16 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + #### QUICK TEST #### |
| 21 | + # This is a much quicker test run which only runs the unit tests against the low/medium/high |
| 22 | + # supported PHP versions and skips the PHAR test and the tests for external JS/CSS tooling. |
| 23 | + # These are basically the same builds as in the Test->Coverage workflow, but then without doing |
| 24 | + # the code-coverage. |
| 25 | + quicktest: |
| 26 | + runs-on: ubuntu-latest |
| 27 | + |
| 28 | + strategy: |
| 29 | + matrix: |
| 30 | + php: ['5.4', '7.2', 'latest'] |
| 31 | + |
| 32 | + name: "QuickTest: PHP ${{ matrix.php }}" |
| 33 | + |
| 34 | + steps: |
| 35 | + - name: Checkout code |
| 36 | + uses: actions/checkout@v4 |
| 37 | + |
| 38 | + - name: Install PHP |
| 39 | + uses: shivammathur/setup-php@v2 |
| 40 | + with: |
| 41 | + php-version: ${{ matrix.php }} |
| 42 | + ini-values: 'error_reporting=-1, display_errors=On' |
| 43 | + coverage: none |
| 44 | + |
| 45 | + # Install dependencies and handle caching in one go. |
| 46 | + # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer |
| 47 | + - name: Install Composer dependencies |
| 48 | + uses: "ramsey/composer-install@v2" |
| 49 | + with: |
| 50 | + # Bust the cache at least once a month - output format: YYYY-MM. |
| 51 | + custom-cache-suffix: $(date -u "+%Y-%m") |
| 52 | + |
| 53 | + - name: 'PHPCS: set the path to PHP' |
| 54 | + run: php bin/phpcs --config-set php_path php |
| 55 | + |
| 56 | + - name: 'PHPUnit: run the tests' |
| 57 | + run: vendor/bin/phpunit tests/AllTests.php |
| 58 | + |
| 59 | + # Note: The code style check is run as an integration test. |
| 60 | + - name: 'PHPCS: check code style without cache, no parallel' |
| 61 | + run: php bin/phpcs --no-cache --parallel=1 |
0 commit comments