Update actions #219
Workflow file for this run
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: Test Coverage | |
on: [workflow_dispatch, push, pull_request] | |
env: | |
DB_ENDPOINT: 'http://127.0.0.1:8529' | |
jobs: | |
run: | |
runs-on: ubuntu-18.04 | |
name: Test coverage | |
services: | |
arangodb: | |
image: arangodb:latest | |
ports: | |
- 8529:8529 | |
env: | |
ARANGO_NO_AUTH: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v4 | |
with: | |
php-version: 8.1 | |
extensions: mbstring, intl | |
ini-values: post_max_size=256M, short_open_tag=On | |
coverage: xdebug | |
- name: Install Ocular globally | |
run: composer global require scrutinizer/ocular | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Prepare test database | |
run: | | |
chmod +x "${GITHUB_WORKSPACE}/bin/prepare-test-db.sh" | |
"${GITHUB_WORKSPACE}/bin/prepare-test-db.sh" | |
- name: Test coverage | |
run: | | |
./vendor/bin/testbench migrate:fresh --path=tests/Setup/Database/Migrations --realpath --seed --seeder=Tests\\Setup\\Database\\Seeds\\DatabaseSeeder | |
./vendor/bin/testbench package:test --coverage | |
echo "Upload results to Scrutinizer-ci" | |
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover clover.xml |