Skip to content

ci: update workflow actions #49

ci: update workflow actions

ci: update workflow actions #49

Workflow file for this run

name: "Run tests on NodeJS"
on:
push:
paths:
- ".github/workflows/nodejs.yml"
- "src/**"
- "tests/**"
- "types/**"
- "biome.jsonc"
- "package.json"
- "pnpm-lock.yaml"
pull_request:
paths:
- ".github/workflows/nodejs.yml"
- "src/**"
- "tests/**"
- "types/**"
- "biome.jsonc"
- "package.json"
- "pnpm-lock.yaml"
workflow_dispatch:
jobs:
default:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: ["18", "20", "22", "24"]
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 10
- name: "Install NSIS (macOS)"
if: matrix.os == 'macos-latest'
run: |
brew update
brew install nsis
- name: "Install NSIS (Ubuntu)"
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get -y update
sudo apt-get -y install nsis
- name: "Install NSIS (Windows)"
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop bucket add nsis https://github.com/NSIS-Dev/scoop-nsis
scoop install nsis/nsis
"$HOME\scoop\apps\nsis\current" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: "Print NSIS version"
run: makensis -VERSION
- name: "Print NSIS header info"
run: makensis -HDRINFO
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
- name: "Get pnpm store directory"
id: pnpm-cache
run: |
echo "::set-output name=pnpm_store_path::$(pnpm store path)"
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
name: "Setup pnpm cache"
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_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 --strict-peer-dependencies
- name: "Lint Source"
if: matrix.os != 'windows-latest'
run: pnpm exec biome ci
- name: "Build Source"
run: pnpm run --if-present build
- name: "Run Tests"
run: pnpm run --if-present test