name: worker on: push: branches: [main] paths: - "packages/worker/**" - "packages/build-tools/**" - "packages/eas-build-job/**" - "packages/steps/**" - "packages/logger/**" - "packages/downloader/**" - "packages/template-file/**" - "packages/turtle-spawn/**" - .github/workflows/worker.yml - .github/workflows/build-and-deploy-worker.yml - yarn.lock concurrency: group: worker-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: worker-checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - uses: ./.github/actions/setup-mise - run: yarn install --immutable - run: yarn typecheck - name: Run unit tests working-directory: packages/worker run: yarn test:unit - name: Run integration tests working-directory: packages/worker run: yarn test:integration worker-build: needs: - worker-checks uses: ./.github/workflows/build-and-deploy-worker.yml secrets: inherit with: environment: ${{ github.ref == 'refs/heads/main' && 'staging' || '' }} system-tests-staging: if: github.ref == 'refs/heads/main' && !failure() && !cancelled() needs: - worker-build - worker-checks uses: ./.github/workflows/worker-system-tests.yml secrets: inherit deploy-worker-production: if: github.ref == 'refs/heads/main' && !failure() && !cancelled() needs: - system-tests-staging uses: ./.github/workflows/build-and-deploy-worker.yml secrets: inherit with: environment: production notify-slack: runs-on: ubuntu-latest needs: - deploy-worker-production if: github.ref == 'refs/heads/main' && always() && !cancelled() steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - name: Notify Slack uses: ./.github/internal-actions/notify-slack-on-fail-or-recover with: channel: turtle-bots slack_webhook: ${{ secrets.SLACK_EAS_WORKFLOWS_WEBHOOK }}