Skip to content

Merge pull request #36 from decode2/feat/unix-pty-backend #87

Merge pull request #36 from decode2/feat/unix-pty-backend

Merge pull request #36 from decode2/feat/unix-pty-backend #87

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
# Callable so the release pipeline gates on this exact workflow instead of a
# copy of it. There is only one definition of "green", and it cannot drift.
workflow_call:
inputs:
ref:
description: 'Git ref to verify; defaults to the triggering ref'
required: false
type: string
# Cancel superseded runs on the same ref to save runner minutes.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
name: Frontend (typecheck, test, build)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
# Each check below runs even when an earlier one failed, so one run
# reports every problem at once.
- name: Lint
if: ${{ !cancelled() }}
run: npm run lint
- name: Typecheck
if: ${{ !cancelled() }}
run: npm run typecheck
- name: Test
if: ${{ !cancelled() }}
run: npm test
- name: Build
if: ${{ !cancelled() }}
run: npm run build
rust:
name: Rust (fmt, clippy, test)
# The native core (ConPTY, clipboard) is Windows-only, so it must be
# built and tested on Windows.
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
components: rustfmt, clippy
- name: Cache Cargo build
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
# A `cargo fmt` failure used to abort this job at its first step, which
# hid the clippy and test results behind a formatting diff. Every check
# now runs regardless, so one run reports every problem.
- name: Check formatting
if: ${{ !cancelled() }}
run: cargo fmt --all -- --check
- name: Clippy
if: ${{ !cancelled() }}
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test compatibility harness
run: cargo test -p splice-compat
- name: Test
if: ${{ !cancelled() }}
run: cargo test --workspace