Skip to content

More changes to CI and subsequent fixes #554

More changes to CI and subsequent fixes

More changes to CI and subsequent fixes #554

Workflow file for this run

name: ci
on:
push: { branches: [master] }
pull_request: { branches: ["*"] }
jobs:
check:
name: Check (${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
matrix:
rust: ["stable", "nightly"] # "1.67.0",
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with: { toolchain: "${{ matrix.rust }}" }
- name: Run cargo check for codespan
run: cargo check
- name: Run cargo check for codespan-reporting
run: cargo check -p codespan-reporting
- name: Run cargo check for codespan-lsp
run: cargo check -p codespan-lsp
test:
needs: check
name: Test Suite (${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: ["stable", "nightly"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with: { toolchain: '${{ matrix.rust }}' }
- name: Run cargo test for codespan
run: cargo test -p codespan
- name: Run cargo test for codespan-reporting (no features)
run: cargo test -p codespan-reporting --no-default-features
- name: Run cargo test for codespan-reporting (only std feature)
run: cargo test -p codespan-reporting --no-default-features --features std
- name: Run cargo test for codespan-reporting (all default features)
run: cargo test -p codespan-reporting
- name: Run cargo test for codespan-lsp
run: cargo test -p codespan-lsp
format:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: { rust: ["stable"] }
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with: { toolchain: '${{ matrix.rust }}', components: 'rustfmt' }
- name: Run cargo fmt
run: cargo fmt --all -- --check
- uses: kaleidawave/release-downloader@improvements
with: { items: 'kaleidawave/simple-toml-parser@canary[format]' }
- name: Check 'Cargo.toml' formatting
run: format cargo --check
lint:
needs: check
name: clippy (${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: { rust: ["stable"] }
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with: { toolchain: '${{ matrix.rust }}', components: 'clippy' }
- name: Run cargo clippy
run: cargo clippy --all
publish-ability:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dorny/paths-filter@v3
id: changes
with: { filters: "{ 'manifests': ['**/*.toml'] }" }
- uses: kaleidawave/release-downloader@improvements
if: steps.changes.outputs.manifests == 'true'
with: { items: 'kaleidawave/crates-release-gh-action@assets[crates-release]' }
- name: Check that it will publish to crates.io
if: steps.changes.outputs.manifests == 'true'
run: crates-release verify