Repository navigation
feat(triage): make labels off by default (CL-12165) (#852) #2803
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 | |
| on: | |
| pull_request: | |
| merge_group: | |
| # Main moves only through the merge queue, which ran the checks on this commit, so a push only publishes the images. | |
| push: | |
| branches: | |
| - main | |
| # Builds both images without pushing them. | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name != 'push' }} | |
| jobs: | |
| lint: | |
| if: github.event_name == 'pull_request' || github.event_name == 'merge_group' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup | |
| - run: bun run lint | |
| typecheck: | |
| needs: changes | |
| if: github.event_name == 'pull_request' || github.event_name == 'merge_group' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| env: | |
| RUN: ${{ github.event_name != 'pull_request' || needs.changes.outputs.code == 'true' }} | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| persist-credentials: false | |
| - if: env.RUN == 'true' | |
| uses: ./.github/actions/setup | |
| - if: env.RUN == 'true' | |
| run: bun run check | |
| # Each suite runs on a pull request only when it touches what the suite covers. | |
| test: | |
| needs: changes | |
| if: github.event_name == 'pull_request' || github.event_name == 'merge_group' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| env: | |
| RUN: >- | |
| ${{ github.event_name != 'pull_request' || needs.changes.outputs.shared == 'true' | |
| || (matrix.suite == 'unit' && (needs.changes.outputs.hub == 'true' || needs.changes.outputs.web == 'true')) | |
| || (matrix.suite == 'postgres' && needs.changes.outputs.hub == 'true') | |
| || (matrix.suite == 'dom' && needs.changes.outputs.web == 'true') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suite: [unit, postgres] | |
| shard: [1/3, 2/3, 3/3] | |
| include: | |
| - suite: dom | |
| shard: 1/1 | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| persist-credentials: false | |
| - if: env.RUN == 'true' && matrix.suite == 'postgres' | |
| uses: ./.github/actions/postgres | |
| - if: env.RUN == 'true' | |
| uses: ./.github/actions/setup | |
| # Not --parallel: run side by side on the runner's four cores, tests that time a subprocess or a parse fail. | |
| - if: env.RUN == 'true' | |
| run: bun run test:${{ matrix.suite }} --shard=${{ matrix.shard }} | |
| changes: | |
| if: github.event_name == 'pull_request' || github.event_name == 'merge_group' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| platform: ${{ steps.filter.outputs.platform }} | |
| shared: ${{ steps.filter.outputs.shared }} | |
| hub: ${{ steps.filter.outputs.hub }} | |
| web: ${{ steps.filter.outputs.web }} | |
| code: ${{ steps.code.outputs.code }} | |
| steps: | |
| - id: filter | |
| if: github.event_name == 'pull_request' | |
| uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| with: | |
| filters: | | |
| shared: | |
| - 'packages/**' | |
| - 'vendor/**' | |
| - 'tooling/**' | |
| - 'tests/**' | |
| - 'bun.lock' | |
| - 'package.json' | |
| - 'tsconfig*.json' | |
| - '.github/**' | |
| hub: | |
| - 'apps/hub/**' | |
| - 'apps/sidecar/**' | |
| web: | |
| - 'apps/web/**' | |
| - 'apps/extension/**' | |
| platform: | |
| - 'apps/hub/**' | |
| - 'apps/sidecar/**' | |
| - 'apps/web/scripts/**' | |
| - 'apps/web/src/lib/**' | |
| - 'tooling/**' | |
| - 'packages/**' | |
| - 'tests/chain/**' | |
| - 'vendor/**' | |
| - 'bun.lock' | |
| - 'package.json' | |
| - '.github/workflows/ci.yml' | |
| - '.github/actions/**' | |
| # Set when any changed file is more than Markdown. | |
| - id: code | |
| if: github.event_name == 'pull_request' | |
| uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| with: | |
| predicate-quantifier: every | |
| filters: | | |
| code: | |
| - '**' | |
| - '!**/*.md' | |
| # Every shard job reports so its required check is satisfied; the steps run only when platform code changed. | |
| # Each shard lists its files: the slow scenarios are spread by measured time, which --shard cannot do. | |
| chain: | |
| name: chain (${{ matrix.shard }}) | |
| needs: changes | |
| if: github.event_name == 'pull_request' || github.event_name == 'merge_group' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| RUN: ${{ github.event_name != 'pull_request' || needs.changes.outputs.platform == 'true' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - shard: 1/5 | |
| files: tests/chain/always.test.ts | |
| - shard: 2/5 | |
| files: tests/chain/reread.test.ts tests/chain/unset.test.ts | |
| - shard: 3/5 | |
| files: tests/chain/pushed.test.ts tests/chain/deterministic.test.ts | |
| - shard: 4/5 | |
| files: tests/chain/waiting.test.ts tests/chain/judged.test.ts | |
| - shard: 5/5 | |
| files: tests/chain/held.test.ts | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| persist-credentials: false | |
| - if: env.RUN == 'true' | |
| uses: ./.github/actions/postgres | |
| - if: env.RUN == 'true' | |
| uses: ./.github/actions/setup | |
| - if: env.RUN == 'true' | |
| run: bun --conditions=intx-src test --parallel=2 ${{ matrix.files }} | |
| - if: failure() && env.RUN == 'true' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: chain-hub-logs-${{ strategy.job-index }} | |
| overwrite: true | |
| path: tmp/chain-logs | |
| policy: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| checks: read | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| persist-credentials: false | |
| - uses: corbitsdev/corbits-triage/packages/policy-check-action@fadfc025e385b9c3e796d94c2c66a4435b4df12f | |
| sidecar: | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| permissions: | |
| contents: read | |
| packages: write | |
| uses: ./.github/workflows/image.yml | |
| with: | |
| name: corbits-triage-sidecar | |
| target: sidecar | |
| hub: | |
| needs: sidecar | |
| permissions: | |
| contents: read | |
| packages: write | |
| uses: ./.github/workflows/image.yml | |
| with: | |
| name: corbits-triage-hub | |
| build-args: SIDECAR_IMAGE=${{ needs.sidecar.outputs.image }} |