Skip to content

Commit

Permalink
chore: speed up CI by skipping pnpm install of test apps (#1245)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwouts authored Nov 26, 2022
1 parent f94066b commit ec1e461
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 29 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- name: Extract version from package.json
uses: sergeysova/[email protected]
id: version
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- name: Update NPM token
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- id: checkApiVersion
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-intellij-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-vscode-extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- run: cd .. && pnpm turbo run build --scope=@previewjs/loader --include-dependencies
- name: Extract version from package.json
uses: sergeysova/[email protected]
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-vscodium-extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- run: cd .. && pnpm turbo run build --scope=@previewjs/loader --include-dependencies
- name: Extract version from package.json
uses: sergeysova/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-app-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-full-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-full-
- uses: pnpm/[email protected]
with:
run_install: true
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- run: pnpm turbo run build --scope="@previewjs/cli" --include-dependencies
7 changes: 4 additions & 3 deletions .github/workflows/test-core-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- run: pnpm lint
- run: pnpm check-licenses
- run: pnpm check-deps
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-intellij.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- run: pnpm turbo run build --scope=@previewjs/intellij-controller --include-dependencies
- run: cd integrations/intellij && ./gradlew ktlintCheck
- run: cd integrations/intellij && ./gradlew runPluginVerifier
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-vscode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
key: ${{ runner.os }}-exclude-test-apps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}-exclude-test-apps-
- uses: pnpm/[email protected]
with:
run_install: true
run_install: |
- args: [--filter=\!./frameworks/\*/tests/apps/\*]
- run: pnpm turbo run build --scope="@previewjs/loader" --include-dependencies
- run: cd integrations/vscode && pnpm build

0 comments on commit ec1e461

Please sign in to comment.