forked from 1b-agent/opencadstudio-upstream
- .github/workflows/ci.yml runs `cargo test --workspace --locked` on pushes to main and on pull requests, with the Linux libraries the release build installs. No formatter check: the tree is not rustfmt-clean and stays that way. - flake.nix, flake.lock and the direnv hook are removed. Nothing used them, and their pinned dependency hashes were already stale after the codec and kernel bumps. - Under cfg(test) the "system" language resolves to en-US. The unit tests compare English text through one process-wide loader, and every apply_config of a default config asked for the system language, so a Turkish locale failed 22 tests and parallel tests raced each other through a language switch (the thickness-row test found its section under one language and looked it up under another). - The arc grip test follows #1352: the start, end and midpoint grips drive the whole arc. Co-Authored-By: Claude Fable 5.1 <[email protected]>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
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.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: tests-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-22.04
|
|
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
|
|
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
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
# LC_ALL=C: a few tests compare English message text.
|
|
- name: cargo test
|
|
env:
|
|
LC_ALL: C
|
|
run: cargo test --workspace --locked
|