refactor: extract maintenance #752
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: "Tests" | |
| on: [pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Run Unit Tests | |
| run: | | |
| docker run --rm \ | |
| -v $PWD:/app \ | |
| -w /app \ | |
| phpswoole/swoole:5.1.2-php8.3-alpine \ | |
| sh -c " | |
| apk update && \ | |
| apk add zip unzip && \ | |
| composer install --profile --ignore-platform-reqs && \ | |
| composer test -- --testsuite=unit | |
| " | |
| executor-tests: | |
| name: Executor Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Start Test Stack | |
| run: | | |
| docker compose build | |
| docker compose up -d --wait --wait-timeout 300 | |
| - name: Doctor | |
| run: | | |
| docker compose logs | |
| docker ps | |
| docker network ls | |
| - name: Run Executor Tests | |
| run: | | |
| docker run --rm \ | |
| -v $PWD:/app \ | |
| -v /tmp:/tmp \ | |
| -v /var/run/docker.sock:/var/run/docker.sock \ | |
| --network executor_runtimes \ | |
| -w /app \ | |
| phpswoole/swoole:5.1.2-php8.3-alpine \ | |
| sh -c " | |
| apk update && \ | |
| apk add docker-cli zip unzip && \ | |
| composer install --profile --ignore-platform-reqs && \ | |
| composer test -- --testsuite=e2e | |
| " |