Skip to content

Commit

Permalink
Use a GHA workflow instead of the run-tests.sh helper script
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Mar 8, 2021
1 parent 2876628 commit a5aea05
Show file tree
Hide file tree
Showing 27 changed files with 50 additions and 1,905 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/system_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: System Tests

on:
pull_request: null

jobs:
system_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0' ]

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

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov

- name: Install dependencies for Rector
run: composer install --no-progress --ansi

# This workflow runs a few system tests. It runs the entire
# Rector application on a few "fixture" projects in tests/system-tests
# to see if those can be processed successfully

- name: Generate Composer autoloaders in fixture directories
run: |
for FIXTURE in `find tests/system-tests -mindepth 1 -maxdepth 1 -type d`; do
(cd $FIXTURE; composer install --no-progress --ansi)
done
- name: Run system tests
run: |
HAS_FAILURES=0
for FIXTURE in `find tests/system-tests -mindepth 1 -maxdepth 1 -type d`; do
echo "-----> Running $FIXTURE <-----"
if (cd $FIXTURE; ../../../bin/rector process --dry-run --clear-cache); then
echo "-----> Result: OK <-----"
else
echo "-----> Result: FAILED <-----"
HAS_FAILURES=1
fi
done
exit $HAS_FAILURES
2 changes: 0 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ jobs:
if: "matrix.dependencies != 'lowest'"

- run: vendor/bin/phpunit

- run: tests/system-tests/run-tests.sh
7 changes: 0 additions & 7 deletions tests/system-tests/dont-execute-code/vendor/autoload.php

This file was deleted.

Loading

0 comments on commit a5aea05

Please sign in to comment.