.gitea/workflows/build-and-test: run tests in separate step
Build and test / build-static-library (push) Failing after 1m48s
Build and test / build-shared-library (push) Failing after 3m33s
Build and test / test (push) Failing after 1m43s

This commit is contained in:
2026-05-06 23:19:54 +09:00
parent 1383559d3c
commit 349f8941e9
2 changed files with 50 additions and 0 deletions
+21
View File
@@ -61,3 +61,24 @@ jobs:
path: result/
if-no-files-found: error
retention-days: 15
test:
runs-on: debian-latest
steps:
- uses: actions/checkout@v6
- name: Install sudo
run: apt-get update && apt-get -y install sudo
- name: Install nix
uses: https://github.com/cachix/install-nix-action@v31
with:
extra_nix_config: |
show-trace = true
max-jobs = auto
trusted-users = root
experimental-features = nix-command flakes
build-users-group =
- name: Build
run: nix build .#tamerye-tests -L
+29
View File
@@ -75,6 +75,7 @@
inherit src;
strictDeps = true;
doCheck = false;
cargoArtifacts = craneLib.buildDepsOnly {
inherit src;
@@ -86,7 +87,9 @@
pname = "tamerye-static-lib";
version = cargoToml.package.version;
inherit src;
strictDeps = true;
doCheck = false;
postPatch = ''
'${lib.getExe pkgs.yq-go}' '.lib.crate-type = [ "staticlib" ]' --inplace Cargo.toml
@@ -107,6 +110,32 @@
cargoExtraArgs = lib.escapeShellArgs [ "--features" "static" ];
};
tamerye-tests = craneLib.cargoNextest {
pname = "tamerye-tests";
version = cargoToml.package.version;
inherit src;
strictDeps = true;
buildInputs = with pkgs; [
sqlite
];
cargoArtifacts = craneLib.buildDepsOnly {
inherit src;
strictDeps = true;
buildInputs = with pkgs; [
sqlite
];
};
cargoExtraArgs = lib.escapeShellArgs [ "--features" "static" ];
partitions = 1;
partitionType = "count";
cargoNextestPartitionsExtraArgs = "--no-tests=pass";
};
});
};
}