fix bug #296
This file contains 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: "Run tests" | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- .docker/** | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- .docker/** | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.0] | |
name: For PHP ${{ matrix.php }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Start MongoDB | |
uses: getong/[email protected] | |
with: | |
mongo version: '4.4.6' | |
host port: 27017 | |
mongo username: 'root' | |
mongo password: 'root' | |
- name: Cache dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ~/.composer/cache/files | |
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: pcov | |
- name: Duplicate example env file | |
run: cp .env.example .env | |
- name: Install dependencies | |
run: composer install --no-interaction --no-suggest | |
- name: Execute tests | |
run: vendor/bin/phpunit --testdox --coverage-clover build/logs/clover.xml | |
env: | |
DB_HOST: localhost |