chore(ci): add fossa workflow #52
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
# GithHub Actions Workflow generated with Ghygen | |
# Original configuration: https://ghygen.hi-folks.dev?code=53bf3a7694e16ad62a03fb51a3a71d71 | |
name: Run Tests | |
on: [push, pull_request] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: example-app | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ['8.0', '8.1'] | |
dependency-stability: ['prefer-stable'] | |
name: P${{ matrix.php-versions }} - ${{ matrix.operating-system}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install PHP versions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: pcov | |
- name: Install Dependencies | |
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.testing', '.env');" | |
- name: PHP Version | |
run: php --version | |
# Code quality | |
- name: Execute tests via PestPHP | |
run: | | |
export COMMIT_SHA=$GITHUB_SHA | |
vendor/bin/pest --coverage --coverage-cobertura coverage.xml | |
env: | |
APP_KEY: ${{ secrets.APP_KEY }} | |
CODECOV_OTEL_PROFILING_TOKEN: ${{ secrets.CODECOV_OTEL_PROFILING_TOKEN }} | |
- uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: PHP-v${{ matrix.php-versions }}_${{ matrix.operating-system}} | |
files: ./example-app/coverage.xml |