Skip to content

Add end-to-end tests #14

Add end-to-end tests

Add end-to-end tests #14

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: 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