Release v1.9.0 #286
This file contains hidden or 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: | |
| branches: | |
| - main | |
| - dev | |
| paths: | |
| - 'backend/**' | |
| - '.github/workflows/tests.yml' | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| paths: | |
| - 'backend/**' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: '8.4' | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, opentelemetry, protobuf | |
| coverage: xdebug | |
| - name: Copy .env | |
| working-directory: backend | |
| run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
| - name: Get Composer Cache Directory | |
| working-directory: backend | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('backend/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install Dependencies | |
| working-directory: backend | |
| run: | | |
| composer self-update | |
| composer install --prefer-dist --no-progress --no-scripts | |
| composer dump-autoload | |
| - name: Generate key | |
| working-directory: backend | |
| run: php artisan key:generate | |
| - name: Directory Permissions | |
| working-directory: backend | |
| run: chmod -R 777 storage bootstrap/cache | |
| - name: Execute tests (via Pest) | |
| working-directory: backend | |
| run: vendor/bin/pest --coverage-text --coverage-clover=coverage.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: backend/coverage.xml | |
| fail_ci_if_error: true |