Fix feature-gated colored formatting #130
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'dependabot/**' | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 8 * * 1' | |
| jobs: | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| security-events: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| clean: true | |
| - name: Install Rust | |
| run: | | |
| curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly | |
| source "$HOME/.cargo/env" | |
| # REF: https://crates.io/crates/cargo2junit | |
| - name: Install Cargo-to-JUnit | |
| run: cargo install cargo2junit | |
| - name: Cargo Build | |
| run: | | |
| cargo build --features alias,fmt,lazy | |
| cargo build --features async | |
| - name: Cargo Test | |
| run: | | |
| cargo test --features alias,fmt,lazy -- -Z unstable-options --format json --report-time | cargo2junit > target/debug/results.xml | |
| cargo test --features async -- -Z unstable-options --format json --report-time | cargo2junit > target/debug/results-async.xml | |
| # REF: https://github.com/marketplace/actions/publish-test-results | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: (!cancelled()) | |
| with: | |
| files: | | |
| target/debug/*.xml |