Skip to content

Commit

Permalink
build(ci): add some simple CI for cargo {check,fmt,test}
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Oct 27, 2023
1 parent 44e58a0 commit 1fefe90
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
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

0 comments on commit 1fefe90

Please sign in to comment.