Skip to content

chore: switch to pnpm #612

chore: switch to pnpm

chore: switch to pnpm #612

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm run test
e2e:
runs-on: ubuntu-latest
# Don't run e2es on PRs from forks as it requires access to secrets
# when using `pull_request`.
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'bazel-contrib/publish-to-bcr' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
# Setup gcloud application default credentials. While the credentials are not actually
# used because Google api services are stubbed, instantiating any of the Google node
# clients requires the credentials file to exist and be valid.
- uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_CREDENTIALS }}"
- uses: google-github-actions/setup-gcloud@v2
with:
version: ">= 363.0.0"
- run: pnpm install --frozen-lockfile
- run: pnpm run e2e