Skip to content

GitHub Actions: Test on the latest macOS X64 and ARM64 #769

GitHub Actions: Test on the latest macOS X64 and ARM64

GitHub Actions: Test on the latest macOS X64 and ARM64 #769

Workflow file for this run

name: Test
on:
push:
paths-ignore:
- ".github/workflows/prebuild.yaml"
pull_request:
paths-ignore:
- ".github/workflows/prebuild.yaml"
jobs:
Test:
name: Test on Node.js
strategy:
fail-fast: false
matrix:
node: [18.x, 20.x, 22.x, latest]
os: [macos-13, macos-latest, ubuntu-latest, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y libcairo2-dev libgif-dev libjpeg-dev libpango1.0-dev librsvg2-dev
- name: Install macOS Dependencies
if: runner.os == 'macOS'
# Pre-installed on GitHub Actions macOS images: cairo giflib libpng pkg-config
run: brew install jpeg librsvg pango # cairo giflib libpng pkg-config
- name: Install Windows Dependencies
if: runner.os == 'Windows'
run: |
Invoke-WebRequest "https://ftp-osl.osuosl.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip"
Expand-Archive gtk.zip -DestinationPath "C:\GTK"
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
.\libjpeg.exe /S
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test
Lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: latest
- uses: actions/checkout@v4
- name: Install
run: npm install --ignore-scripts
- name: Lint
run: npm run lint
- name: Lint Types
run: npm run tsd