ci: remove pnpm/action-setup in favor of corepack #389
Workflow file for this run
This file contains 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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Node.js CI | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- name: Install Node.js 20.x.x | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: 20.x.x | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run build-all | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: 'build' | |
path: 'packages/*/dist/' | |
test: | |
needs: ['build'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- name: Install Node.js 20.x.x | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: 20.x.x | |
- run: pnpm install --frozen-lockfile | |
- uses: actions/download-artifact@v4 | |
id: download | |
with: | |
name: 'build' | |
path: 'packages' | |
- run: pnpm run test-all | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- name: Install Node.js 20.x.x | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: 20.x.x | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run lint | |
publint: | |
needs: ['build'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- name: Install Node.js 20.x.x | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: 20.x.x | |
- run: pnpm install --frozen-lockfile | |
- uses: actions/download-artifact@v4 | |
id: download | |
with: | |
name: 'build' | |
path: 'packages' | |
- run: pnpm run publint |