Test pnpm caching #1881
This file contains hidden or 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: Test pnpm caching | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
schedule: | |
- cron: "20 */6 * * *" | |
workflow_dispatch: | |
# Allow check to run on the merge queue so that it is eligible to be a "required" check. | |
merge_group: | |
types: [checks_requested] | |
permissions: | |
contents: read | |
jobs: | |
pnpm: | |
runs-on: | |
- namespace-profile-e2e-small | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: nscloud-cache-action | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: "8.6.2" | |
- uses: actions/checkout@v4 | |
with: | |
repository: namespace-integration-demos/cache-pnpm-workspace | |
path: demo | |
- name: Setup pnpm cache | |
uses: ./nscloud-cache-action # Uses an action in the root directory | |
with: | |
cache: pnpm | |
- run: pnpm install | |
working-directory: ./demo/fullstack | |
- name: Print cache metadata file | |
run: | | |
ls -al /cache/.ns | |
cat /cache/.ns/cache-metadata.json | |
ignore-warnings: | |
strategy: | |
matrix: | |
pnpm-version: | |
- "8.15.5" | |
- "9.7.0" | |
- "9.15.0" | |
runs-on: | |
- namespace-profile-e2e-small | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: nscloud-cache-action | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ matrix.pnpm-version }} | |
- name: Produce problematic .npmrc | |
run: | | |
cp ./nscloud-cache-action/.github/workflows/testdata/.npmrc . | |
- name: Setup pnpm cache | |
uses: ./nscloud-cache-action # Uses an action in the root directory | |
with: | |
cache: pnpm |