Skip to content

Separate e2e format and typecheck jobs#914

Merged
rylew1 merged 9 commits intomainfrom
rylew/fix-e2e-static-checks
Apr 23, 2025
Merged

Separate e2e format and typecheck jobs#914
rylew1 merged 9 commits intomainfrom
rylew/fix-e2e-static-checks

Conversation

@rylew1
Copy link
Copy Markdown
Contributor

@rylew1 rylew1 commented Mar 20, 2025

Ticket

Resolves #813

Changes

  • separate e2e format and typecheck jobs in github actions with matrix strategy
  • add fail-fast:false to allow all e2e static checks to run regardless of one failure
  • add workflow_dispatch to manually trigger static checks [to be tested post merge]

Context

The e2e format and typecheck calls were in the same GHA job - this PR just separates them to separate jobs so they can run in parallel.


- name: Install dependencies
if: steps.cache-node.outputs.cache-hit != 'true'
run: make e2e-setup-ci
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way we don't have to repeat the common setup steps for both jobs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the matrix strategy:

jobs:
  static-checks:
    name: ${{ matrix.check.name }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        check:
          - name: Format
            command: make e2e-format-check-native
          - name: Typecheck
            command: make e2e-type-check-native

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: lts/*

      - name: Cache Node.js dependencies
        id: cache-node
        uses: actions/cache@v4
        with:
          path: e2e/node_modules
          key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}

      - name: Install dependencies
        if: steps.cache-node.outputs.cache-hit != 'true'
        run: make e2e-setup-ci

      - name: ${{ matrix.check.name }}
        run: ${{ matrix.check.command }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea sounds good to me

@rylew1 rylew1 changed the title Separate format and typecheck jobs Separate e2e format and typecheck jobs Mar 20, 2025
@rylew1 rylew1 merged commit 0108d1d into main Apr 23, 2025
7 checks passed
@rylew1 rylew1 deleted the rylew/fix-e2e-static-checks branch April 23, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add formatting/linting/ts check in E2E

2 participants