Skip to content

Commit

Permalink
chore: add tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
albertcht committed Sep 15, 2024
1 parent e4741a0 commit 0f14538
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: tests

on:
push:
pull_request:

jobs:
linux_tests:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

strategy:
fail-fast: true
matrix:
include:
- php: "8.1"
swoole: "5.1.3"
- php: "8.2"
swoole: "5.1.3"
- php: "8.3"
swoole: "5.1.3"
- php: "8.1"
swoole: "5.1.4"
- php: "8.2"
swoole: "5.1.4"
- php: "8.3"
swoole: "5.1.4"

name: PHP ${{ matrix.php }} (swoole-${{ matrix.swoole }})

container:
image: phpswoole/swoole:${{ matrix.swoole }}-php${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute tests
run: |
PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --diff
vendor/bin/phpunit -c phpunit.xml.dist

0 comments on commit 0f14538

Please sign in to comment.