Add CI test workflow

This commit is contained in:
2025-11-05 21:24:01 +11:00
parent 6158ae31d2
commit e26f4c933b
2 changed files with 32 additions and 2 deletions

31
.github/workflows/test.yaml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Build & test
on:
push:
paths: [ ".github/workflows/**", "**/*.rs", "**/Cargo.toml", "**/.cargo/config.toml" ]
pull_request:
paths: [ "**/*.rs", "**/Cargo.toml", "**/.cargo/config.toml" ]
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
CARGO_PROFILE: release-debuginfo
jobs:
build:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose --profile ${{env.CARGO_PROFILE}}
- name: Run tests
run: cargo test --verbose --profile ${{env.CARGO_PROFILE}}

View File

@@ -62,7 +62,7 @@ main:
* API updates, enough public constructs to roll a custom help writer.
* Generalised internal error & usage into `StandardErrorUsageWriter` for reuse outside the easy API & in `no_std`.
* Fixed uncontrollable newlines in user display in easy API.
* More tests for validating internal behaviour.
* More tests for validating internal behaviour & enabled CI on GitHub.
v0.1.1:
* Fixed incorrect error message format for coerced parsing errors.
@@ -78,7 +78,6 @@ Near future:
* Actual `no_std` tests & examples.
* More control over parsing behaviour (getopt style, no special casing shorts for Windows style flags, etc.)
* More practical examples.
* CI on main GitHub.
Long term:
* Strategy for handling exclusive argument groups.