name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry + build artifacts
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --all-targets --verbose
- name: Test (lib unit + integration + spec + stress + doc)
run: cargo test --all-targets --verbose
- name: Doc tests
run: cargo test --doc --verbose
- name: CommonMark spec — surface full report in CI log
run: cargo test --test commonmark_spec -- --nocapture