Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 22 additions & 30 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
name: ci
on: [ push ]
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly

steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
- name: Checkout
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- uses: actions-rs/cargo@v1
with:
command: build

- uses: actions-rs/cargo@v1
with:
command: test

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

- uses: actions-rs/cargo@v1
components: clippy, rustfmt
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Build test
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- uses: giraffate/clippy-action@v1
with:
command: clippy
reporter: 'github-pr-review'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Check formatting
run: cargo fmt --all --check
Loading