Skip to content

improve type

improve type #23

Workflow file for this run

name: CI
on:
push:
paths:
- '.github/**'
- 'src/**'
- 'tests/**'
- 'types/**'
- 'package.json'
- 'pnpm-lock.yaml'
pull_request:
paths:
- '.github/**'
- 'src/**'
- 'tests/**'
- 'types/**'
- 'package.json'
- 'pnpm-lock.yaml'
workflow_dispatch:
jobs:
default:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: ['18', 'lts/*', '*']
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
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
- name: Print NSIS version
run: makensis -VERSION
- name: Print NSIS header info
run: makensis -HDRINFO
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ matrix.node-version }}
- name: Enable Corepack
run: corepack enable
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_store_path::$(pnpm store path)"
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
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
run: pnpm run --if-present lint
- name: Build Source
run: pnpm run --if-present build
- name: Run Tests
run: pnpm run --if-present test