diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..af88405 --- /dev/null +++ b/.github/workflows/test.yaml @@ -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}} diff --git a/README.md b/README.md index 8137901..27d83ac 100644 --- a/README.md +++ b/README.md @@ -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.