Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zizhengtai committed Sep 12, 2019
1 parent 04667ea commit cf95715
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/rust.yml
Expand Up @@ -15,7 +15,7 @@ jobs:

# macOS doesn't come with Rust installed
- name: Install
if: matrix.os == 'macOS-latest'
if: startsWith(matrix.os, 'macOS')
run: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none

# Only lint on Linux as code style isn't platform-dependent
Expand All @@ -26,10 +26,17 @@ jobs:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features --all -- -D warnings
- name: Test
if: matrix.os != 'macOS-latest'
- name: Test (Linux & Windows)
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'windows')
run: cargo test --all-targets --all-features --all

# We installed Rust manually on macOS, so need to configure the environment
- name: Test (macOS)
if: startsWith(matrix.os, 'macOS')
run: |
source $HOME/.cargo/env
cargo test --all-targets --all-features --all
# Audit in a separate job because installing cargo-audit takes a long time
audit:
name: Audit dependencies
Expand Down

0 comments on commit cf95715

Please sign in to comment.