config(app): use helper function to get environment variable #33
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: Backend Tests | |
on: | |
push: [] | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- review_requested | |
branches: | |
- master | |
paths: | |
- 'src/**' | |
- '.github/workflows/backend.yml' | |
jobs: | |
backend_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: shivammathur/[email protected] | |
with: | |
php-version: "8.1" | |
env: | |
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }} | |
- uses: actions/checkout@v4 | |
- name: Copy env | |
run: php -r "file_exists('.env.ci') || copy('.env.ci', '.env');" | |
- name: Cache vendors | |
uses: actions/cache@v3 | |
with: | |
path: ./vendor | |
key: ${{ runner.os }}_8.1_${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}_8.1_${{ hashFiles('composer.lock') }} | |
- name: Update Dependencies | |
run: composer update | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Set Writable Directory Permissions | |
run: chmod -R a+rwx writable | |
- name: Run all tests | |
run: composer run test:offline:all |