Merge pull request #36 from clemblanco/migrate-tests-to-playground #135
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: Tests | |
on: ['push', 'pull_request'] | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: ['20.x', '22.x'] | |
php: ['8.3', '8.4'] | |
dependency-version: [prefer-stable] | |
parallel: [''] | |
name: PHP ${{ matrix.php }} - Node ${{ matrix.node }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} - ${{ matrix.parallel }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Aspell | |
shell: bash | |
run: | | |
if [[ "$RUNNER_OS" == "Linux" ]]; then | |
sudo apt-get update && sudo apt-get install -y aspell aspell-en | |
elif [[ "$RUNNER_OS" == "macOS" ]]; then | |
brew install aspell | |
fi | |
- name: Setup Node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
coverage: xdebug | |
- name: Setup Problem Matches | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install PHP dependencies | |
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi | |
- name: Install NPM dependencies | |
run: | | |
npm install | |
npm run playwright -- install | |
- name: Tests | |
run: composer test |