Skip to content

Commit

Permalink
fix(github): fix workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge authored and rexxars committed Feb 14, 2024
1 parent 0b572f1 commit 5a215ca
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cli-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build CLI
run: pnpm build:cli # Needed for CLI tests
run: pnpm build # Needed for CLI tests

- name: Test
id: test
run: |
node -v
npm -v
pnpm test --silent --selectProjects=@sanity/cli
pnpm test -- --silent --selectProjects=@sanity/cli
env:
# Update token in github and change below to ${{ secrets.SANITY_CI_CLI_AUTH_TOKEN }} after merge to next
SANITY_CI_CLI_AUTH_TOKEN_STAGING: ${{ secrets.SANITY_CI_CLI_AUTH_TOKEN_STAGING }}
4 changes: 2 additions & 2 deletions .github/workflows/e2e-ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build CLI
run: pnpm build:cli # Needed for CLI tests
- name: Build packages
run: pnpm build
- name: Run end-to-end tests
run: pnpm --filter sanity test:ct
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-pte.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
run: npx playwright install --with-deps

- name: Run end-to-end tests
run: cd packages/@sanity/portable-text-editor && pnpm test:e2e --silent --shard=${{ matrix.shardIndex}}/${{ matrix.shardTotal }}
run: cd packages/@sanity/portable-text-editor && pnpm test:e2e -- --silent --shard=${{ matrix.shardIndex}}/${{ matrix.shardTotal }}
9 changes: 6 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ jobs:
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
run: npx playwright install --with-deps

- name: Build CLI
run: pnpm build:cli # Needed for CLI tests

- name: Build E2E test studio on next
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
env:
Expand Down Expand Up @@ -117,6 +114,9 @@ jobs:
with:
node-version: 18

- name: Install pnpm
run: corepack enable && pnpm --version

- name: Cache node modules
id: cache-node-modules
uses: actions/cache/restore@v3
Expand Down Expand Up @@ -206,6 +206,9 @@ jobs:
with:
node-version: 18

- name: Install pnpm
run: corepack enable && pnpm --version

- name: Cache node modules
id: cache-node-modules
uses: actions/cache/restore@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-fix-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
path: .eslintcache
key: eslint-v1-${{ hashFiles('.eslintrc.cjs') }}
- run: "pnpm lint:fix --rule 'prettier/prettier: [off]'"
- run: "pnpm lint:fix -- --rule 'prettier/prettier: [off]'"
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
# Run even if `pnpm lint:fix` fails
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prettier-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
path: node_modules/.cache/prettier/.prettier-cache
key: prettier-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm prettier --write
- run: pnpm prettier -- --write
- name: GitHub blocks PRs from automation that alter workflows in any way
run: git restore .github/workflows pnpm-lock.yaml
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build CLI
run: pnpm build:cli # Needed for CLI tests
run: pnpm build # Needed for CLI tests

test:
timeout-minutes: 60
Expand Down Expand Up @@ -103,6 +103,9 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Install pnpm
run: corepack enable && pnpm --version

- name: Restore node_modules cache
uses: actions/cache/restore@v3
id: restore-node-modules
Expand Down Expand Up @@ -136,7 +139,7 @@ jobs:
run: |
node -v
npm -v
pnpm test --silent --shard=${{ matrix.shardIndex}}/${{ matrix.shardTotal }} --ignoreProjects=@sanity/cli
pnpm test -- --silent --shard=${{ matrix.shardIndex}}/${{ matrix.shardTotal }} --ignoreProjects=@sanity/cli
env:
GITHUB_SHARD_IDENTIFIER: ${{ matrix.shardIndex }}-${{ matrix.shardTotal }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typeCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
# If TypeScript project references is set up properly, `tsc --build` should work right after dependencies
# has been installed, no extra build/compile step required
id: typeCheckModules
run: pnpm type-check
run: pnpm check:types
env:
NODE_OPTIONS: --max_old_space_size=8192

0 comments on commit 5a215ca

Please sign in to comment.