Add GitHub Rust workflow and dependabot integration

This commit is contained in:
Anthony Oteri
2023-09-13 21:44:06 -04:00
parent 7b0c3f1dcc
commit 74b2f87e51
2 changed files with 54 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
version: 2
updates:
- package-ecosystem: "cargo"
schedule:
interval: "daily"
+49
View File
@@ -0,0 +1,49 @@
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt,clippy
- uses: Swatinem/rust-cache@v2
- name: Formatting
run: cargo fmt --check --all
- name: Linting
run: cargo clippy --all --tests
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: Swatinem/rust-cache@v2
- run: cargo test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build