jsonwebtoken/.github/workflows/ci.yml

76 lines
1.5 KiB
YAML

name: ci
on:
push:
branches:
- master
pull_request:
jobs:
style:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Check format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings
tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [pinned, stable, nightly]
include:
- build: pinned
os: ubuntu-20.04
rust: 1.56.0
- build: stable
os: ubuntu-20.04
rust: stable
- build: nightly
os: ubuntu-20.04
rust: nightly
steps:
- uses: actions/checkout@v1
- name: Install Rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- name: Build System Info
run: rustc --version
- name: Run tests default features
run: cargo test
- name: Run tests no features
run: cargo test --no-default-features