Skip to content

Merge pull request #661 from Pixilib/parametrable-ts-export #1475

Merge pull request #661 from Pixilib/parametrable-ts-export

Merge pull request #661 from Pixilib/parametrable-ts-export #1475

Workflow file for this run

name: 'tests'
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
tests:
name: 'Tests Gaelo'
runs-on: ubuntu-latest
steps:
- name: 'Build checkout'
uses: actions/checkout@v3
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: 'Copy .env'
working-directory: ./GaelO2
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: 'Install Dependencies'
working-directory: ./GaelO2
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: 'Generate key'
working-directory: ./GaelO2
run: php artisan key:generate
- name: 'Directory Permissions'
working-directory: ./GaelO2
run: chmod -R 777 storage bootstrap/cache
- name: 'Create Database'
working-directory: ./GaelO2
run: |
mkdir -p database
touch database/database.sqlite
- name: 'Execute tests (Unit and Feature tests) via PHPUnit'
working-directory: ./GaelO2
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
APP_ENV: testing
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Fix code coverage paths
working-directory: ./GaelO2
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml