Skip to content

fix: windows compatibility #7

fix: windows compatibility

fix: windows compatibility #7

Workflow file for this run

name: Test
on:
pull_request:
paths:
- src/*.rs
- Cargo.toml
- jakefile.toml
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Jake (also sets up Rust)
uses: AstraBert/setup-jake@v0.1.0
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests
run: jake test
test-windows:
name: Test on windows-latest
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
${{ runner.os == 'Windows' && '~\\.cargo\\registry' || '~/.cargo/registry' }}
${{ runner.os == 'Windows' && '~\\.cargo\\git' || '~/.cargo/git' }}
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests
run: cargo test