Skip to content

Commit

Permalink
Add GitHub Actions configuration (#13)
Browse files Browse the repository at this point in the history
This is a minimal setup that checks code formatting, clippy lints (also
a `check`), documentation and specifically broken intradoc links and
directives, and the current MSRV of 1.58.1.
  • Loading branch information
MarijnS95 authored Nov 7, 2022
1 parent f721774 commit efaf628
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
on: [push, pull_request]

name: CI

jobs:
clippy:
name: Clippy
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets -- -D warnings

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

doc:
name: Build documentation
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --workspace --all-features --document-private-items

check_msrv:
name: Check MSRV (1.58.1)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: dtolnay/rust-toolchain@1.58.1
- uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --all-targets --all-features

0 comments on commit efaf628

Please sign in to comment.