-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 939 Bytes
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Thanks to https://dzfrias.dev/blog/deploy-rust-cross-platform-github-actions on which
# most of this workflow was based
name: Run Tests
on:
workflow_call:
pull_request:
permissions:
contents: read
jobs:
test:
name: cargo test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: macos-x86_64
os: macos-latest
target: x86_64-apple-darwin
- build: windows-gnu-x86_64
os: windows-latest
target: x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@v4
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Run tests
shell: bash
run: |
cargo test --target "${{ matrix.target }}" --all-features