Fix tests with different path separators #58
Workflow file for this run
This file contains 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, pull_request ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- { name: "Rust 1.74", rust: "1.74", os: ubuntu-latest, cargo_args: "" } | |
- { name: "Rust stable", rust: stable, os: ubuntu-latest, cargo_args: "" } | |
- { name: "Rust nighly", rust: nightly, os: ubuntu-latest, cargo_args: "" } | |
- { name: "Rust nighly, windows", rust: nightly, os: windows-latest, cargo_args: "" } | |
- { name: "Rust nighly, no default features", rust: nightly, os: ubuntu-latest, cargo_args: "--no-default-features" } | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt | |
- name: Build | |
run: cargo build ${{ matrix.cargo_args }} | |
env: | |
RUSTFLAGS: -Dwarnings | |
- name: Test | |
run: cargo test ${{ matrix.cargo_args }} --color always | |
- name: Format check | |
run: cargo fmt --check | |
- name: Run omnilinter on its own repository (all checks) | |
run: cargo --quiet run ${{ matrix.cargo_args }} -- --color always --format=by-rule --config .omnilinter.conf . | |
- name: Run omnilinter on its own repository (fatal checks) | |
run: cargo --quiet run ${{ matrix.cargo_args }} -- --color always --format=by-rule --config .omnilinter.conf --error-exitcode 1 --tags fatal . | |
coverage: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
name: Coverage | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
- name: Test | |
run: cargo test | |
env: | |
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | |
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | |
- name: Collect coverage | |
uses: actions-rs/[email protected] | |
- name: Submit coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |