forked from 1b-agent/opencadstudio-upstream
ci: run tests on Linux, Windows and macOS; add non-blocking lint job
Tests previously ran on Ubuntu only, so Windows- and macOS-specific breakage went unseen. Add a 3-OS test matrix and a separate lint job for rustfmt and clippy. Lint is continue-on-error because the tree is not yet fmt-clean or clippy-clean. Also add BEDIT characterization tests that pin current session, undo and refusal behavior ahead of the editor refactor. Locked tests guard behavior that must survive; documenting tests record questionable behavior expected to change.
This commit is contained in:
1 parent
8dca7fbaed
commit
2c2bb9bba5
2 files changed
+378
-8
No files matched your search
@@ -1,10 +1,8 @@
|
||||
name: Tests
|
||||
|
||||
# Until now nothing ran the test suite on a change: the release workflows
|
||||
# build the app, web-check.yml type-checks the wasm target, and pull requests
|
||||
# reported their own local runs. Run the workspace tests on every push to
|
||||
# main and on every pull request. There is deliberately no formatter check:
|
||||
# the tree is not rustfmt-clean and is not going to be reformatted.
|
||||
# Runs the workspace tests on every push to main and on every pull request,
|
||||
# on Linux, Windows and macOS. A separate lint job reports rustfmt and clippy
|
||||
# results without blocking merges until the existing tree has been cleaned up.
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -20,13 +18,19 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
name: test (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04, windows-latest, macos-14]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The same libraries the Linux release build needs (windowing, GL,
|
||||
# fonts); the packaging tools are left out.
|
||||
- name: System libraries
|
||||
- name: System libraries (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
@@ -37,8 +41,38 @@ jobs:
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
# LC_ALL=C: a few tests compare English message text.
|
||||
# LC_ALL=C: a few tests compare English message text. The GPU-backed
|
||||
# tests are #[ignore]d and need an adapter, so they do not run here.
|
||||
- name: cargo test
|
||||
env:
|
||||
LC_ALL: C
|
||||
run: cargo test --workspace --locked
|
||||
|
||||
lint:
|
||||
name: lint (informational)
|
||||
runs-on: ubuntu-22.04
|
||||
# Non-blocking until the existing tree is cleaned up. The tree currently has
|
||||
# thousands of rustfmt diffs and several clippy warnings and errors, so
|
||||
# these checks report status without failing the workflow.
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: System libraries
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
libgl1-mesa-dev libx11-dev libxcursor-dev libxi-dev libxrandr-dev \
|
||||
libxkbcommon-dev libwayland-dev libfontconfig1-dev libfreetype6-dev
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: cargo fmt --check
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: cargo clippy
|
||||
run: cargo clippy --workspace --all-targets --locked
|
||||
Reference in new issue
Block a user