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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
name: Tests
on:
push:
branches: [master]
paths:
- ".github/workflows/test.yml"
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"
pull_request:
branches: [master]
paths:
- ".github/workflows/test.yml"
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"
jobs:
build:
name: Test target ${{ matrix.target }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
- wasm32-wasip1
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: wasm32-wasip1
os: ubuntu-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
targets: ${{ matrix.target }}
toolchain: stable
- name: cargo build
run: cargo build --target=${{ matrix.target }}
docs:
name: Doc Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Test
run: cargo test --features=chrono_0_4 --doc
test:
name: Test feature ${{ matrix.feature }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature:
- chrono_0_4
- time_0_3
- jiff_0_1
- jiff_0_2
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Test
run: cargo test --features=${{ matrix.feature }} --tests
|