Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from max-niederman/ci
Browse files Browse the repository at this point in the history
ci: add check, format, and lint jobs
  • Loading branch information
Gavin-Niederman authored Oct 21, 2023
2 parents 9a80cc7 + d6bc728 commit 72f67f7
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Rust

on: [push, pull_request]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2

- name: Setup | Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Check
uses: actions-rs/cargo@v1
with:
command: check

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2

- name: Setup | Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Setup | Install Rustfmt
run: rustup component add rustfmt

- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2

- name: Setup | Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: clippy
override: true

- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

0 comments on commit 72f67f7

Please sign in to comment.