Work around corepack pnpm keys in GitHub actions #81
Workflow file for this run
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: Code quality | |
on: | |
push: | |
branches-ignore: | |
- 'temp/**' | |
- 'backup/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
TURBO_TELEMETRY_DISABLED: true | |
DO_NOT_TRACK: true | |
jobs: | |
static-check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
submodules: true | |
- name: Cache turbo setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: 📥 Monorepo install | |
uses: ./.github/actions/yarn-nm-install | |
with: | |
enable-corepack: true | |
cache-node-modules: true | |
cache-install-state: true | |
- name: Use Latest Corepack # Fix for https://github.com/nodejs/corepack/issues/612 | |
run: | | |
npm install -g corepack@latest | |
- name: Submodule install | |
run: cd better-auth/ && corepack enable && pnpm i && cd .. | |
- name: Check prettier styles | |
run: yarn stylecheck | |
- name: Check types | |
run: yarn typecheck | |
- name: Lint | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Cache turbo setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: 📥 Monorepo install | |
uses: ./.github/actions/yarn-nm-install | |
with: | |
enable-corepack: true | |
cache-node-modules: true | |
cache-install-state: true | |
- name: Use Latest Corepack # Fix for https://github.com/nodejs/corepack/issues/612 | |
run: | | |
npm install -g corepack@latest | |
- name: Submodule install | |
run: cd better-auth/ && corepack enable && pnpm i && cd .. | |
- name: Test | |
run: yarn test |