Test CI #54
5 changed files with 36 additions and 3 deletions
11
.woodpecker/build_backend.yaml
Normal file
11
.woodpecker/build_backend.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
when:
|
||||
- event: pull_request
|
||||
|
||||
steps:
|
||||
- name: "Run cargo test"
|
||||
image: nixos/nix
|
||||
commands:
|
||||
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||
- nix build --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt .#backend
|
||||
volumes:
|
||||
- /nix:/mnt/nix:ro
|
|
@ -3,7 +3,7 @@ when:
|
|||
|
||||
steps:
|
||||
- name: "Run cargo clippy"
|
||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
||||
image: nixos/nix
|
||||
commands:
|
||||
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||
- nix develop --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt
|
||||
|
|
|
@ -3,7 +3,7 @@ when:
|
|||
|
||||
steps:
|
||||
- name: "Run cargo test"
|
||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
||||
image: nixos/nix
|
||||
commands:
|
||||
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||
- nix develop --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt
|
||||
|
|
|
@ -3,7 +3,7 @@ when:
|
|||
|
||||
steps:
|
||||
- name: "Run treefmt"
|
||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
||||
image: nixos/nix
|
||||
commands:
|
||||
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||
- nix fmt --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt -- --fail-on-change
|
||||
|
|
22
flake.nix
22
flake.nix
|
@ -80,6 +80,28 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
backend = pkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "backend";
|
||||
version = "0.1";
|
||||
|
||||
src = pkgs.lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = pkgs.lib.fileset.unions [
|
||||
./Cargo.lock
|
||||
./Cargo.toml
|
||||
./crates
|
||||
./.cargo
|
||||
];
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
meta = {
|
||||
mainProgram = "backend";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
formatter = forSystems (
|
||||
|
|
Loading…
Add table
Reference in a new issue