Skip to content

Commit

Permalink
Update CI workflow installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphka committed Sep 18, 2024
1 parent c981afe commit 1f2710d
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Node.js CI

on: [
push,
pull_request
]
on: push

jobs:
build:
Expand All @@ -13,7 +10,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
os: [
windows-latest,
ubuntu-latest
]
node-version: [
20.3.0
]
Expand All @@ -23,32 +23,18 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Type checking
run: pnpm lint
cache: 'pnpm'

- name: Test project
run: pnpm test
Expand Down

0 comments on commit 1f2710d

Please sign in to comment.