Skip to content

Get CI into production-ready shape #3

Get CI into production-ready shape

Get CI into production-ready shape #3

Workflow file for this run

name: build
on: pull_request
jobs:
codestyle:
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v1
with:
components: rustfmt
rust-version: stable
- uses: actions/checkout@v2
- run: cargo fmt --all -- --check
lint:
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v1
with:
components: clippy
- uses: actions/checkout@v2
- run: cargo clippy --all-targets --all-features -- -D clippy::all
compile:
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v1
- uses: actions/checkout@v2
- run: cargo check --all
test:
needs: [codestyle, lint, compile]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable, 1.56.1]
exclude:
- os: macOS-latest
rust: 1.56.1
runs-on: ${{ matrix.os }}
steps:
- name: Setup Rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- name: Checkout
uses: actions/checkout@v2
- name: Fixes for MSRV
if: matrix.rust == '1.56.1'
run: |
cargo update
cargo update -p cc --precise 1.0.105
- name: Test
run: cargo test