Add automated tests #58
Workflow file for this run
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" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: [pull_request] | |
| jobs: | |
| unit_test: | |
| name: Unit Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: Load and Start Services | |
| run: | | |
| docker compose build | |
| docker compose up -d | |
| sleep 10 | |
| - name: Run Unit Tests | |
| run: docker compose exec tests vendor/bin/phpunit /usr/src/code/tests/unit | |
| adapter_test: | |
| name: Adapter Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| adapter: | |
| [ | |
| AMQP, | |
| SwooleRedisCluster, | |
| Swoole, | |
| Workerman, | |
| ] | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: Load and Start Services | |
| run: | | |
| docker compose build | |
| docker compose up -d | |
| sleep 10 | |
| - name: Run Tests | |
| run: docker compose exec -T tests vendor/bin/phpunit /usr/src/code/tests/Queue/E2E/Adapter/${{matrix.adapter}}Test.php --debug |