Added endpoint to save recorded videos (#15) #59
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: Tests Code Coverage | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
jobs: | |
phpunit-code-coverage: | |
runs-on: ubuntu-latest | |
container: | |
image: escolalms/php:8.2 | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: database | |
MYSQL_PASSWORD: password | |
MYSQL_USER: username | |
ports: | |
- 33306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Instantiate package | |
run: apt-get install git -y | |
- name: Instantiate package | |
uses: actions/checkout@v2 | |
- name: Setup environment | |
run: cp -r env/codecov/. . | |
- name: Update composer | |
run: composer update | |
- name: require phpunit-github-actions-printer | |
run: composer require --dev mheap/phpunit-github-actions-printer | |
- name: Clear config | |
run: vendor/bin/testbench config:clear | |
- name: Publish things | |
run: vendor/bin/testbench migrate:fresh | |
- name: Generate keys | |
run: | | |
vendor/bin/testbench passport:keys --force | |
vendor/bin/testbench passport:client --personal --no-interaction | |
- name: Run tests | |
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover coverage.xml --printer mheap\\GithubActionsReporter\\Printer | |
- name: codecov upload | |
uses: codecov/codecov-action@v1 | |
- name: Setup Code Climate test-reporter | |
run: | | |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
chmod +x ./cc-test-reporter | |
- name: SafeDirFix | |
run: git config --global safe.directory '*' | |
- name: Convert | |
run: ./cc-test-reporter format-coverage coverage.xml -t clover -o codeclimate.0.json | |
- name: Upload | |
run: ./cc-test-reporter upload-coverage -i codeclimate.0.json | |
env: | |
CC_TEST_REPORTER_ID: 22c0c19cd6d3400f27aa0b94fdef59330cb28a87e71e72c2d3d998d355cbe63e |