adding bref to automate lambda deployment #26
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 | |
on: [push] | |
jobs: | |
test: | |
name: PHPUnit | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: setup enviroment | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install dependencies | |
run: composer install | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Clear Config | |
run: php artisan config:clear | |
- name: Laravel PHPUnit | |
run: php artisan test --coverage-clover ./coverage.xml | |
- name: Upload coverage reports to Codacy | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: ./coverage.xml |