Docker setup #53
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: "Tests on PHP ${{ matrix.php }}${{ matrix.name_suffix }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: [ '8.2', '8.3', '8.4' ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Docker compose | |
| env: | |
| PHP_VERSION: ${{ matrix.php }} | |
| run: | | |
| docker compose up -d --wait --build | |
| sleep 10 | |
| - name: Run tests | |
| run: docker compose exec app vendor/bin/phpunit | |
| static_analysis: | |
| name: Static analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| run: docker build -t app . | |
| - name: Run static analysis | |
| run: docker run app vendor/bin/phpstan analyse --memory-limit=1G | |
| playwright_test: | |
| name: "Playwright TypeScript" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Install dependencies | |
| working-directory: playwright | |
| run: npm install | |
| - name: Run TypeScript | |
| working-directory: playwright | |
| # build to check for errors | |
| run: npm run build |