fix: make sure linux tests do not run on windows #5
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: Continuous integration | |
on: | |
push: | |
branches: | |
- "**" | |
tags-ignore: | |
- "pathtrim-*" | |
pull_request: | |
env: | |
CRATE_NAME: pathtrim | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
name: Test - ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- os_name: Linux | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os_name: macOS | |
os: macOS-latest | |
target: x86_64-apple-darwin | |
- os_name: Windows | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
toolchain: | |
- stable | |
- beta | |
- nightly | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache cargo & target directories | |
uses: Swatinem/rust-cache@v2 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: rustfmt | |
- name: Configure Git | |
run: | | |
git config --global user.email "rrrodzilla@proton.me" | |
git config --global user.name "rodzilla" | |
- name: Run cargo check | |
run: cargo check --workspace --target=${{ matrix.platform.target }} | |
- name: Run cargo test | |
run: cargo test --workspace --target=${{ matrix.platform.target }} | |