Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable tests on github actions #29

Merged
merged 1 commit into from Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,36 @@
name: Tests
on: [push, pull_request]
jobs:
units-tests:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1', '8.2']
tests: ['unit_tests', 'integration_tests', 'endtoend_tests']
fail-fast: false
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v2

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer Directory
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress

- name: Run ${{ matrix.tests }}
run: ./vendor/bin/phpunit --testsuite ${{ matrix.tests }}