Test CI #54
7 changed files with 57 additions and 11 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,10 @@ when:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Run cargo check"
|
- name: "Run cargo check"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: nixos/nix
|
||||||
commands:
|
commands:
|
||||||
- nix shell github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
- nix develop --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt
|
||||||
- cargo check --workspace --all-targets
|
- cargo check --workspace --all-targets
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
|
@ -3,7 +3,10 @@ when:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Run cargo clippy"
|
- name: "Run cargo clippy"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: nixos/nix
|
||||||
commands:
|
commands:
|
||||||
- nix shell github:nixos/nixpkgs/nixos-unstable#clippy github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
- nix develop --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt
|
||||||
- cargo clippy
|
- cargo clippy
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
|
@ -3,7 +3,10 @@ when:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Run cargo test"
|
- name: "Run cargo test"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: nixos/nix
|
||||||
commands:
|
commands:
|
||||||
- nix shell github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
- nix develop --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt
|
||||||
- cargo test --workspace --all-targets
|
- cargo test --workspace --all-targets
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
|
@ -3,6 +3,9 @@ when:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Run treefmt"
|
- name: "Run treefmt"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: nixos/nix
|
||||||
commands:
|
commands:
|
||||||
- nix fmt -- --fail-on-change
|
- 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
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
6
flake.lock
generated
6
flake.lock
generated
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742889210,
|
"lastModified": 1743827369,
|
||||||
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=",
|
"narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "698214a32beb4f4c8e3942372c694f40848b360d",
|
"rev": "42a1c966be226125b48c384171c44c651c236c22",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
23
flake.nix
23
flake.nix
|
@ -26,6 +26,7 @@
|
||||||
nodejs
|
nodejs
|
||||||
cargo
|
cargo
|
||||||
clippy
|
clippy
|
||||||
|
gcc
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -79,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 (
|
formatter = forSystems (
|
||||||
|
|
Loading…
Add table
Reference in a new issue