name: test
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6
with:
toolchain: 1.89.0
components: clippy,rustfmt
- run: cargo fmt --check
- run: cargo test --all-features
- run: cargo clippy --all-targets --all-features -- -D warnings
features:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
features:
- ""
- linear
- jira
- all
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6
with:
toolchain: 1.89.0
components: clippy
- name: Build with features = ${{ matrix.features }}
run: |
if [ -z "${{ matrix.features }}" ]; then
cargo build --no-default-features
elif [ "${{ matrix.features }}" = "all" ]; then
cargo build --features all
else
cargo build --no-default-features --features ${{ matrix.features }}
fi