Skip to content

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

GitHub Actions: Test on the latest macOS X64 and ARM64

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

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 Linux
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
os: [macos-13, macos-latest, ubuntu-latest, windows-latest]
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'
run: brew install cairo giflib jpeg libpng librsvg pango 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: 22
- uses: actions/checkout@v4
- name: Install
run: npm install --ignore-scripts
- name: Lint
run: npm run lint
- name: Lint Types
run: npm run tsd