This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
bump(deps): update actions/checkout action to v4 #773
This file contains 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: | |
branches: [main] | |
merge_group: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- run: corepack enable pnpm | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version-file: '.nvmrc' | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm build | |
lint_prettier: | |
name: Lint [prettier] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- run: corepack enable pnpm | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version-file: '.nvmrc' | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm prettier --check . | |
lint_eslint: | |
name: Lint [eslint] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- run: corepack enable pnpm | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version-file: '.nvmrc' | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm turbo run lint | |
test_plan: | |
name: Test [plan] | |
runs-on: ubuntu-latest | |
outputs: | |
packages: ${{ steps.plan.outputs.packages }} | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- run: corepack enable pnpm | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version-file: '.nvmrc' | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
# this step is only required in this repo because the cli source is not yet built | |
- run: pnpm turbo run build --filter=@stickyjs/turbo | |
- id: plan | |
run: | | |
echo 'packages<<EOF' >> $GITHUB_OUTPUT | |
pnpm sticky-turbo plan test >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
test_run: | |
name: Test [run] | |
runs-on: ubuntu-latest | |
needs: test_plan | |
strategy: | |
fail-fast: false | |
matrix: | |
package: ${{ fromJSON(needs.test_plan.outputs.packages) }} | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- run: corepack enable pnpm | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version-file: '.nvmrc' | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm turbo run test --concurrency=1 --filter=${{ matrix.package }} -- --coverage --forceExit | |
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 | |
test_completed: | |
name: Test [completed] | |
runs-on: ubuntu-latest | |
needs: test_run | |
if: always() | |
steps: | |
- run: | | |
if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }} ; then | |
exit 1 | |
fi |