diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f82f6e..500e9d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,12 +11,31 @@ on: pull_request: types: [opened, synchronize, reopened] +concurrency: + group: test-workflow + jobs: + lint: + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.version }} + cache: "yarn" + + - name: Install Dependencies + run: yarn install --immutable + - name: Lint + run: yarn lint test-node: strategy: matrix: version: [18, 20] runs-on: ubuntu-latest + needs: [lint] steps: - uses: actions/checkout@v3 with: @@ -37,6 +56,7 @@ jobs: run: yarn test test-bun: runs-on: ubuntu-latest + needs: [lint] steps: - uses: actions/checkout@v3 with: @@ -64,6 +84,9 @@ jobs: if: ${{ always() }} needs: [test-node, test-bun] runs-on: ubuntu-latest + concurrency: + group: test-workflow + cancel-in-progress: true steps: - uses: actions/checkout@v3 with: