Skip to content

added pure-rust feature to jwt-simple and updated CI #34

added pure-rust feature to jwt-simple and updated CI

added pure-rust feature to jwt-simple and updated CI #34

Workflow file for this run

name: rust
on:
push:
branches: [latest]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test_library:
name: Test library
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup rust stable
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Setup rust nightly
run: rustup toolchain install nightly --profile minimal --no-self-update
- name: Initialize cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ github.ref_name }}
shared-key: ${{ matrix.os }}
cache-all-crates: true
- name: Check formatting
run: cargo fmt -- --check
- name: Check clippy
run: |
cargo clippy --lib --tests --all-targets -- -D warnings
cargo clippy --lib --tests --all-targets --features cache-surf -- -D warnings
cargo clippy --lib --tests --all-targets --no-default-features --features client-reqwest -- -D warnings
cargo clippy --lib --tests --all-targets --no-default-features --features client-reqwest,cache-reqwest -- -D warnings
- name: Run cargo test
run: |
cargo test --all-targets
cargo test --all-targets --features cache-surf
cargo test --all-targets --no-default-features --features client-reqwest
cargo test --all-targets --no-default-features --features client-reqwest,cache-reqwest
- name: Build docs
run: cargo +nightly doc --no-deps --document-private-items
env:
RUSTFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg docsrs -Dwarnings