Skip to content

Commit

Permalink
ci: setup github actions workflows
Browse files Browse the repository at this point in the history
This adds linting and tests
  • Loading branch information
Hofer-Julian committed Sep 6, 2024
1 parent 4912f7f commit aced0f9
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/rust-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Rust Linting

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
fmt:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Run cargo fmt
run: cargo fmt -- --check

clippy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Run cargo clippy
run: cargo clippy --all-targets --workspace -- -D warnings
27 changes: 27 additions & 0 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Rust

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Run tests
run: cargo test --all-targets --workspace

0 comments on commit aced0f9

Please sign in to comment.