Skip to content

Commit

Permalink
Create tests.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Aug 16, 2021
1 parent c01d12c commit d5514e4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/tests.yaml
@@ -0,0 +1,42 @@
name: Tests

on:
pull_request: null

env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"

jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
php: ['8.0']
path:
- tests
- rules-tests
- packages-tests

name: PHP ${{ matrix.php }} tests for ${{ matrix.path }}
steps:
- uses: actions/checkout@v2

-
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- uses: "ramsey/composer-install@v1"

# with --runner=WrapperRunner, it is faster, only ideal with 4 processes (p4)
# @see https://github.com/rectorphp/rector-src/pull/551#issuecomment-889990905
- run: vendor/bin/paratest -p4 --runner=WrapperRunner ${{ matrix.path }}
if: ${{ matrix.path == 'rules-tests' }}

- run: vendor/bin/phpunit ${{ matrix.path }}
if: ${{ matrix.path != 'rules-tests' }}

0 comments on commit d5514e4

Please sign in to comment.