Remove Google key from repo #95
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: CI Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| - feature/** | |
| - slo-* | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| - slo-* | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend || 'true' }} | |
| frontend: ${{ steps.filter.outputs.frontend || 'true' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Filter changes | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| backend: | |
| - 'server/**' | |
| frontend: | |
| - 'client/**' | |
| backend: | |
| name: Backend | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' | |
| defaults: | |
| run: | |
| working-directory: server | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.2" | |
| extensions: mbstring, bcmath, intl, pdo_mysql | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-progress --prefer-dist --optimize-autoloader | |
| - name: Copy env | |
| run: cp .env.example .env | |
| - name: Generate app key | |
| run: php artisan key:generate | |
| - name: Run migrations | |
| run: php artisan migrate --env=testing --force | |
| env: | |
| DB_CONNECTION: sqlite | |
| DB_DATABASE: ":memory:" | |
| - name: Run tests | |
| run: php artisan test | |
| frontend: | |
| name: Frontend | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.frontend == 'true' | |
| defaults: | |
| run: | |
| working-directory: client | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run lint | |
| run: npm run lint --if-present | |
| - name: Clear Jest cache | |
| run: npx jest --clearCache | |
| - name: Run tests | |
| run: npm test -- --watchAll=false | |
| - name: Build project | |
| run: npm run build |