Skip to content

Add GitHub Actions workflow and remove Travis CI (AI based MiniMax) #28

Add GitHub Actions workflow and remove Travis CI (AI based MiniMax)

Add GitHub Actions workflow and remove Travis CI (AI based MiniMax) #28

Workflow file for this run

name: Tests
on:
push:
branches: ['**']
pull_request:
branches: ['**']
jobs:
test:
name: Test on PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: xdebug
coverage: xdebug
- name: Validate composer.json
run: composer validate --strict
- name: Install dependencies
run: composer install --no-interaction
- name: Run tests
run: ./vendor/bin/phpunit --configuration tests/phpunit.xml --testsuite all_tests --coverage-clover coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: coverage.xml
flags: unittests
name: php-${{ matrix.php-version }}