Skip to content

build(ci): add some simple CI for cargo {check,fmt,test} #1

build(ci): add some simple CI for cargo {check,fmt,test}

build(ci): add some simple CI for cargo {check,fmt,test} #1

Workflow file for this run

name: Push checks
on: [push]
jobs:
check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust:
- stable
- beta
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: "Run `cargo check`"
uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust:
- stable
- beta
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: "Run `cargo test`"
uses: actions-rs/cargo@v1
with:
command: test
fmt:
name: Rustfmt
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: "Run `cargo fmt`"
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust:
- stable
- beta
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: clippy
- name: "Run `cargo clippy`"
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings