Skip to content

Fix CI

Fix CI #138

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
rust_version: [stable, beta, 1.56.0]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
- run: cargo update
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
if: matrix.rust_version == 'stable'
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
if: matrix.rust_version == 'stable'
- name: cargo check --features "io_safety"
uses: actions-rs/cargo@v1
with:
command: check
args: --features io_safety
if: ${{ matrix.rust == 'stable' || matrix.rust == 'beta' }}
- name: cargo check --features tokio
uses: actions-rs/cargo@v1
with:
command: check
args: --features tokio
if: ${{ matrix.rust == 'stable' || matrix.rust == 'beta' }}