fix(backend): scope automatic reviews per project and team #5495
Workflow file for this run
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 | |
| permissions: {} | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| jobs: | |
| static-analysis: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js & install dependencies | |
| uses: ./.github/actions/setup-deps | |
| - name: Build | |
| run: pnpm exec -- turbo run build --filter=\!@argos/frontend | |
| - name: Run static checks | |
| run: pnpm exec -- turbo run static-checks | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| NODE_ENV: test | |
| TZ: utc | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js & install dependencies | |
| uses: ./.github/actions/setup-deps | |
| - name: Build | |
| run: pnpm exec -- turbo run build --filter=\!@argos/frontend | |
| - name: Run unit tests | |
| run: pnpm run test:unit | |
| storybook-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| NODE_ENV: test | |
| TZ: utc | |
| ARGOS_TOKEN: ${{ secrets.ARGOS_STORYBOOK_TOKEN }} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js & install dependencies | |
| uses: ./.github/actions/setup-deps | |
| - name: Setup | |
| run: pnpm run build | |
| env: | |
| BUILD_MODE: production | |
| - name: Install Playwright browser | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Run Storybook tests | |
| run: pnpm --dir apps/frontend run test-storybook | |
| storybook-publish: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| ARGOS_TOKEN: ${{ secrets.ARGOS_STORYBOOK_TOKEN }} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js & install dependencies | |
| uses: ./.github/actions/setup-deps | |
| - name: Setup | |
| run: pnpm run build | |
| env: | |
| BUILD_MODE: production | |
| - name: Build Storybook | |
| run: pnpm --dir apps/frontend run build-storybook | |
| - name: Publish Storybook to Argos | |
| run: pnpm --dir apps/frontend run deploy-storybook | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2] | |
| env: | |
| NODE_ENV: test | |
| TZ: utc | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| services: | |
| redis: | |
| image: redis:6-alpine | |
| ports: | |
| - 6380:6379 | |
| # Speed up initialization by disabling health checks | |
| # Services run during the installation of the dependencies | |
| # options: >- | |
| # --health-cmd "redis-cli ping" | |
| # --health-interval 10s | |
| # --health-timeout 5s | |
| # --health-retries 5 | |
| postgres: | |
| image: postgres:17-alpine | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| # Speed up initialization by disabling health checks | |
| # Services run during the installation of the dependencies | |
| # options: >- | |
| # --health-cmd "pg_isready" | |
| # --health-interval 10s | |
| # --health-timeout 5s | |
| # --health-retries 5 | |
| rabbit: | |
| image: rabbitmq:4-alpine | |
| ports: | |
| - 5672:5672 | |
| # Speed up initialization by disabling health checks | |
| # Services run during the installation of the dependencies | |
| # options: >- | |
| # --health-cmd "rabbitmq-diagnostics -q ping" | |
| # --health-interval 10s | |
| # --health-timeout 5s | |
| # --health-retries 5 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js & install dependencies | |
| uses: ./.github/actions/setup-deps | |
| - name: Setup | |
| run: pnpm run setup | |
| env: | |
| BUILD_MODE: production | |
| - name: Test | |
| run: pnpm run test:integration --shard=${{ matrix.shard }}/2 | |
| e2e-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2] | |
| env: | |
| API_BASE_URL: http://localhost:3000 | |
| NODE_ENV: test | |
| TZ: utc | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
| services: | |
| redis: | |
| image: redis:6-alpine | |
| ports: | |
| - 6380:6379 | |
| # Speed up initialization by disabling health checks | |
| # Services run during the installation of the dependencies | |
| # options: >- | |
| # --health-cmd "redis-cli ping" | |
| # --health-interval 10s | |
| # --health-timeout 5s | |
| # --health-retries 5 | |
| postgres: | |
| image: postgres:17-alpine | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| # Speed up initialization by disabling health checks | |
| # Services run during the installation of the dependencies | |
| # options: >- | |
| # --health-cmd "pg_isready" | |
| # --health-interval 10s | |
| # --health-timeout 5s | |
| # --health-retries 5 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js & install dependencies | |
| uses: ./.github/actions/setup-deps | |
| - name: Setup | |
| run: pnpm run setup | |
| env: | |
| BUILD_MODE: production | |
| - name: Run Playwright tests | |
| uses: docker://mcr.microsoft.com/playwright:v1.61.0-jammy | |
| with: | |
| # Fix for Firefox, HOME=/root is required to avoid permission issues | |
| # https://github.com/microsoft/playwright/issues/6500 | |
| args: env HOME=/root npm run test:e2e -- --shard=${{ matrix.shard }}/2 | |
| env: | |
| REDIS_URL: redis://redis:6379/1 | |
| DATABASE_URL: postgresql://postgres@postgres/test | |
| AMQP_URL: amqp://rabbitmq | |
| test-gate: | |
| name: test | |
| runs-on: ubuntu-latest | |
| needs: | |
| [unit-test, storybook-test, storybook-publish, integration-test, e2e-test] | |
| if: ${{ always() }} | |
| steps: | |
| - name: Fail if any test job failed or was cancelled | |
| run: | | |
| if [ "${{ needs.unit-test.result }}" != "success" ] || \ | |
| [ "${{ needs.storybook-test.result }}" != "success" ] || \ | |
| [ "${{ needs.storybook-publish.result }}" != "success" ] || \ | |
| [ "${{ needs.integration-test.result }}" != "success" ] || \ | |
| [ "${{ needs.e2e-test.result }}" != "success" ]; then | |
| echo "At least one test job did not succeed" | |
| exit 1 | |
| fi |