Skip to content

Commit

Permalink
ci: add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoesters committed Dec 4, 2024
1 parent e1bdecd commit 5d3a82e
Show file tree
Hide file tree
Showing 3 changed files with 1,089 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-FileCopyrightText: 2024 Phoenix R&D GmbH <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Build and test Rust code

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
rust-build:
runs-on: ubuntu-latest
steps:
- name: Install cargo-machete
uses: taiki-e/install-action@cargo-machete
- name: Run cargo-machete
run: cargo machete

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

- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt

- name: Rustfmt
run: cargo fmt --check

- name: Clippy
run: cargo clippy --locked --all-targets -D warnings

- name: Build
run: cargo build --verbose

- name: Tests
run: cargo test --verbose
Loading

0 comments on commit 5d3a82e

Please sign in to comment.