docs: update links to npx
(#680)
#1187
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
name: Test | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Authenticate GitHub registry | |
run: npm set "//npm.pkg.github.com:_authToken=${{ secrets.GH_TOKEN }}" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Get pnpm store directory | |
shell: bash | |
run: echo "PNPM_STORE=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Cache pnpm | |
with: | |
path: ${{ env.PNPM_STORE }} | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: ${{ runner.os }}-pnpm- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Get Node.js cache directory | |
shell: bash | |
run: echo "NVE_CACHE=$(node -p 'require("cachedir")("nve")')" >> $GITHUB_ENV | |
- name: Cache Node.js versions | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.NVE_CACHE }} | |
key: ${{ runner.os }}-nodejs-${{ hashFiles('.nvmrc') }}-${{ hashFiles('tests/utils/node-versions.ts') }} | |
restore-keys: ${{ runner.os }}-nodejs- | |
- name: Test | |
run: pnpm test | |
- name: Type check | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: pnpm type-check | |
- name: Lint | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: pnpm lint |