Files
StepForge/.github/workflows/ci.yml
T
Tyler 845b3ed205 Add GitHub Actions: CI and a manual release workflow
- ci.yml: runs the unit test suite (npm test → node --test tests/unit) on
  push and PR to main, across ubuntu/windows/macos with Node 20. Electron is
  installed normally because the capture unit tests require app/capture.js,
  which require()s the electron module at load.

- release.yml: manual workflow_dispatch. Enter a version tag (e.g. v0.1.1);
  it builds the Windows portable .exe (npm run package:windows) and the Linux
  tarball + .deb (scripts/package-linux.sh), stamps the requested version onto
  each artifact, then publishes a GitHub Release at the current commit with
  the artifacts attached and auto-generated notes. Supports a prerelease flag.
2026-06-16 12:39:19 -05:00

38 lines
890 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel an in-progress run when newer commits are pushed to the same ref.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Unit tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
# The capture unit tests require app/capture.js, which require()s the
# electron module at load — so the Electron binary must actually be
# installed (don't set ELECTRON_SKIP_BINARY_DOWNLOAD here).
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm test