Add end-to-end tests #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Code style & tests" | |
on: | |
pull_request: | |
# Run this workflow for all PRs against main | |
branches: | |
- main | |
jobs: | |
php-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
composer-command: | |
- name: PHP Code Style | |
command: 'style:php' | |
- name: Composer normalize | |
command: 'normalize --dry-run' | |
- name: PHPStan | |
command: analyze:php | |
- name: PHPUnit | |
command: test:php | |
directory: ['extension-installer', 'fractor', 'fractor-xml', 'typo3-fractor'] | |
exclude: | |
- directory: extension-installer | |
composer-command: {name: 'PHPUnit', command: 'test:php'} | |
name: ${{ matrix.composer-command.name }}/${{ matrix.directory }} | |
defaults: | |
run: | |
working-directory: ${{ matrix.directory }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install composer dependencies | |
uses: php-actions/composer@v6 | |
with: | |
container_workdir: /app/${{ matrix.directory }} | |
memory_limit: 512M | |
- name: 'Run check "${{ matrix.composer-command.name }}"' | |
uses: php-actions/composer@v6 | |
with: | |
container_workdir: /app/${{ matrix.directory }} | |
command: ${{ matrix.composer-command.command }} | |
memory_limit: 512M | |
tests: | |
runs-on: ubuntu-latest | |
name: End to end tests | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
- name: Install composer dependencies | |
uses: php-actions/composer@v6 | |
with: | |
container_workdir: /app/tests | |
memory_limit: 512M | |
- name: Run tests | |
working-directory: tests | |
run: ./run-test.sh |