Skip to content

Commit

Permalink
test: multi platform setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tirithen committed Jun 9, 2024
1 parent a0677f5 commit b39ff82
Showing 1 changed file with 81 additions and 21 deletions.
102 changes: 81 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,99 @@ on:
pull_request:

jobs:
test_all_features:
name: cargo test (all features)
# Check formatting with rustfmt
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

test_all_ubuntu:
name: cargo test all features (ubuntu)
needs: formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --all-features

test_no_features:
name: cargo test (no features)
test_ubuntu:
name: cargo test (ubuntu)
needs: formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test

test_serde_feature:
name: cargo test (serde)
runs-on: ubuntu-latest
test_all_macos12:
name: cargo test all features (macos 12)
needs:
- test_all_ubuntu
- test_ubuntu
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --features serde
- run: cargo test --all-features

# Check formatting with rustfmt
formatting:
name: cargo fmt
runs-on: ubuntu-latest
test_all_macos14_arm64:
name: cargo test all features (macos 14 arm64)
needs:
- test_all_ubuntu
- test_ubuntu
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
# Ensure rustfmt is installed and setup problem matcher
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
- run: cargo test --all-features

test_all_windows:
name: cargo test all features (windows)
needs:
- test_all_ubuntu
- test_ubuntu
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --all-features

test_macos12:
name: cargo test (macos 12)
needs:
- test_all_ubuntu
- test_ubuntu
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test

test_macos14_arm64:
name: cargo test (macos 14 arm64)
needs:
- test_all_ubuntu
- test_ubuntu
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test

test_windows:
name: cargo test (windows)
needs:
- test_all_ubuntu
- test_ubuntu
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test

0 comments on commit b39ff82

Please sign in to comment.