Merge pull request #19 from randomairborne/master

add simple checking action
This commit is contained in:
0/0 2023-03-13 00:49:22 +00:00 committed by GitHub
commit b695d43afa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

34
.github/workflows/pr.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Check code
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust-version: [stable, nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code into the proper directory
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Cache rust
uses: Swatinem/rust-cache@v2
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --check
- name: Check clippy lints
run: cargo clippy