Merge pull request 'add various cargo ci checks' (#38) from ci/add-rust-stuff into main

Reviewed-on: #38
This commit is contained in:
irgendwas 2025-04-07 09:22:39 +02:00
commit 72bb162b52
4 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,9 @@
when:
- event: pull_request
steps:
- name: "Run cargo check"
image: docker.nix-community.org/nixpkgs/nix-flakes
commands:
- nix shell github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
- cargo check --workspace --all-targets

View file

@ -0,0 +1,9 @@
when:
- event: pull_request
steps:
- name: "Run cargo clippy"
image: docker.nix-community.org/nixpkgs/nix-flakes
commands:
- nix shell github:nixos/nixpkgs/nixos-unstable#clippy github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
- cargo clippy

View file

@ -0,0 +1,9 @@
when:
- event: pull_request
steps:
- name: "Run cargo test"
image: docker.nix-community.org/nixpkgs/nix-flakes
commands:
- nix shell github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
- cargo test --workspace --all-targets

View file

@ -2,7 +2,7 @@ when:
- event: pull_request - event: pull_request
steps: steps:
- name: "Run nix flake check" - name: "Run treefmt"
image: docker.nix-community.org/nixpkgs/nix-flakes image: docker.nix-community.org/nixpkgs/nix-flakes
commands: commands:
- nix fmt -- --fail-on-change - nix fmt -- --fail-on-change