test: move nix files
Test / Create distribution (push) Failing after 20s
Test / Sandbox (push) Successful in 2m51s
Test / ShareFS (push) Successful in 3m58s
Test / Hakurei (push) Successful in 4m6s
Test / Sandbox (race detector) (push) Successful in 5m37s
Test / Hakurei (race detector) (push) Successful in 6m51s
Test / Flake checks (push) Failing after 17s

These are too much clutter. Move them to test directory until the test suite replacement is upstreamed.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-07-07 18:32:56 +09:00
parent c8e8651694
commit 149c1de5e2
17 changed files with 25 additions and 30 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build for release - name: Build for release
run: nix build --print-out-paths --print-build-logs .#dist run: nix build --print-out-paths --print-build-logs ./test#dist
- name: Release - name: Release
uses: https://gitea.com/actions/release-action@main uses: https://gitea.com/actions/release-action@main
+6 -6
View File
@@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Run NixOS test - name: Run NixOS test
run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.hakurei run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.hakurei
- name: Upload test output - name: Upload test output
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Run NixOS test - name: Run NixOS test
run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.race run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.race
- name: Upload test output - name: Upload test output
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -46,7 +46,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Run NixOS test - name: Run NixOS test
run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.sandbox run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox
- name: Upload test output - name: Upload test output
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -63,7 +63,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Run NixOS test - name: Run NixOS test
run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.sandbox-race run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox-race
- name: Upload test output - name: Upload test output
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -80,7 +80,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Run NixOS test - name: Run NixOS test
run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.sharefs run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sharefs
- name: Upload test output - name: Upload test output
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -117,7 +117,7 @@ jobs:
run: >- run: >-
export HAKUREI_REV="$(git rev-parse --short HEAD)" && export HAKUREI_REV="$(git rev-parse --short HEAD)" &&
sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' package.nix && sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' package.nix &&
nix build --print-out-paths --print-build-logs .#dist && nix build --print-out-paths --print-build-logs ./test#dist &&
mv package.nix.old package.nix && mv package.nix.old package.nix &&
echo "rev=$HAKUREI_REV" >> $GITHUB_OUTPUT echo "rev=$HAKUREI_REV" >> $GITHUB_OUTPUT
-5
View File
@@ -58,8 +58,3 @@ package [internal/rosa](https://pkg.go.dev/hakurei.app/internal/rosa).
New dependencies will generally not be added. Patches adding new dependencies New dependencies will generally not be added. Patches adding new dependencies
are very likely to be rejected. are very likely to be rejected.
## NixOS Module (deprecated)
The NixOS module is in maintenance mode and will be removed once planterette is
feature-complete. Full module documentation can be found [here](options.md).
+1 -1
View File
@@ -54,7 +54,7 @@ testers.nixosTest {
# Run with Go race detector: # Run with Go race detector:
environment.hakurei = lib.mkIf withRace rec { environment.hakurei = lib.mkIf withRace rec {
# race detector does not support static linking # race detector does not support static linking
package = (pkgs.callPackage ../package.nix { }).overrideAttrs (previousAttrs: { package = (pkgs.callPackage ./package.nix { }).overrideAttrs (previousAttrs: {
env = previousAttrs.env // { env = previousAttrs.env // {
GOFLAGS = previousAttrs.env.GOFLAGS + " -race"; GOFLAGS = previousAttrs.env.GOFLAGS + " -race";
}; };
View File
+11 -11
View File
@@ -43,19 +43,19 @@
; ;
in in
{ {
hakurei = callPackage ./test { inherit system self; }; hakurei = callPackage ./. { inherit system self; };
race = callPackage ./test { race = callPackage ./. {
inherit system self; inherit system self;
withRace = true; withRace = true;
}; };
sandbox = callPackage ./test/sandbox { inherit self; }; sandbox = callPackage ./sandbox { inherit self; };
sandbox-race = callPackage ./test/sandbox { sandbox-race = callPackage ./sandbox {
inherit self; inherit self;
withRace = true; withRace = true;
}; };
sharefs = callPackage ./cmd/sharefs/test { inherit system self; }; sharefs = callPackage ./sharefs { inherit system self; };
formatting = runCommandLocal "check-formatting" { nativeBuildInputs = [ nixfmt ]; } '' formatting = runCommandLocal "check-formatting" { nativeBuildInputs = [ nixfmt ]; } ''
cd ${./.} cd ${./.}
@@ -116,7 +116,7 @@
nettools nettools
; ;
}; };
hsu = pkgs.callPackage ./cmd/hsu/package.nix { inherit (self.packages.${system}) hakurei; }; hsu = pkgs.callPackage ./hsu.nix { inherit (self.packages.${system}) hakurei; };
sharefs = pkgs.linkFarm "sharefs" { sharefs = pkgs.linkFarm "sharefs" {
"bin/sharefs" = "${hakurei}/libexec/sharefs"; "bin/sharefs" = "${hakurei}/libexec/sharefs";
"bin/mount.fuse.sharefs" = "${hakurei}/libexec/sharefs"; "bin/mount.fuse.sharefs" = "${hakurei}/libexec/sharefs";
@@ -190,11 +190,11 @@
}; };
} }
./test/interactive/configuration.nix ./interactive/configuration.nix
./test/interactive/vm.nix ./interactive/vm.nix
./test/interactive/hakurei.nix ./interactive/hakurei.nix
./test/interactive/trace.nix ./interactive/trace.nix
./test/interactive/raceattr.nix ./interactive/raceattr.nix
self.nixosModules.hakurei self.nixosModules.hakurei
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
+1 -1
View File
@@ -8,7 +8,7 @@ buildGoModule {
pname = "${hakurei.pname}-hsu"; pname = "${hakurei.pname}-hsu";
inherit (hakurei) version; inherit (hakurei) version;
src = ./.; src = ../cmd/hsu;
inherit (hakurei) vendorHash; inherit (hakurei) vendorHash;
env.CGO_ENABLED = 0; env.CGO_ENABLED = 0;
+1 -1
View File
@@ -16,7 +16,7 @@
src = builtins.path { src = builtins.path {
name = "${pname}-src"; name = "${pname}-src";
path = lib.cleanSource ../../cmd/sharefs/test; path = lib.cleanSource ../sharefs;
filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path); filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path);
}; };
vendorHash = null; vendorHash = null;
View File
View File
View File
+2 -2
View File
@@ -34,11 +34,11 @@
buildGo126Module rec { buildGo126Module rec {
pname = "hakurei"; pname = "hakurei";
version = with lib.strings; removePrefix "v" (trim (builtins.readFile ./cmd/dist/VERSION)); version = with lib.strings; removePrefix "v" (trim (builtins.readFile ../cmd/dist/VERSION));
srcFiltered = builtins.path { srcFiltered = builtins.path {
name = "${pname}-src"; name = "${pname}-src";
path = lib.cleanSource ./.; path = lib.cleanSource ../.;
filter = path: type: !(type == "regular" && (lib.hasSuffix ".nix" path || lib.hasSuffix ".py" path)) && !(type == "directory" && lib.hasSuffix "/test" path) && !(type == "directory" && lib.hasSuffix "/cmd/hsu" path); filter = path: type: !(type == "regular" && (lib.hasSuffix ".nix" path || lib.hasSuffix ".py" path)) && !(type == "directory" && lib.hasSuffix "/test" path) && !(type == "directory" && lib.hasSuffix "/cmd/hsu" path);
}; };
vendorHash = null; vendorHash = null;
+1 -1
View File
@@ -14,7 +14,7 @@ testers.nixosTest {
# Run with Go race detector: # Run with Go race detector:
environment.hakurei = lib.mkIf withRace rec { environment.hakurei = lib.mkIf withRace rec {
# race detector does not support static linking # race detector does not support static linking
package = (pkgs.callPackage ../../package.nix { }).overrideAttrs (previousAttrs: { package = (pkgs.callPackage ../package.nix { }).overrideAttrs (previousAttrs: {
env = previousAttrs.env // { env = previousAttrs.env // {
GOFLAGS = previousAttrs.env.GOFLAGS + " -race"; GOFLAGS = previousAttrs.env.GOFLAGS + " -race";
}; };