This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
cleanup readme #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source of this pipeline code: https://github.com/paskausks/rust-bin-github-workflows | |
# MIT License - Copyright (c) 2019 Rihards Paskausks | |
# Modified by | |
# Copyright (c) 2024 Malte Janz | |
name: CI | |
on: | |
pull_request: # trigger on pull requests | |
push: | |
branches: # array of glob patterns matching against refs/heads. Optional; defaults to all | |
- main # triggers on pushes that contain changes in main | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest # full build + test on every major platform is done by the release pipeline | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install latest stable Rust version | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Cargo build | |
run: cargo build --verbose | |
- name: Cargo test | |
run: cargo test --verbose --all-features | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install latest stable Rust version | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run cargo fmt | |
run: cargo fmt -- --check | |
clippy_check: | |
name: Clippy check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install latest stable Rust version | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- uses: giraffate/clippy-action@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
clippy_flags: --all-features | |
reporter: 'github-pr-review' |