Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdejonge committed Jan 3, 2025
1 parent 1228bd6 commit 92ae933
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI

on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ubuntu-latest

strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.65.0

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

- name: Cache
uses: Swatinem/rust-cache@v1

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose

doc:
name: Build documentation
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true

- name: Build
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --workspace --verbose

fmt:
name: Check formatting
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
profile: minimal
override: true

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

0 comments on commit 92ae933

Please sign in to comment.