aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.build.yml3
-rw-r--r--default.nix11
2 files changed, 14 insertions, 0 deletions
diff --git a/.build.yml b/.build.yml
index 479e6af..48ed2a4 100644
--- a/.build.yml
+++ b/.build.yml
@@ -13,6 +13,9 @@ tasks:
- setup : |
curl https://nixos.org/nix/install | sh
echo '. $HOME/.nix-profile/etc/profile.d/nix.sh' >> $HOME/.buildenv
+ - tests: |
+ cd website/
+ nix-build -A test
- publish: |
cd website/
nix-build -A publishScript
diff --git a/default.nix b/default.nix
index aba5d38..39523e5 100644
--- a/default.nix
+++ b/default.nix
@@ -34,6 +34,17 @@ in with pkgs; with pkgs.stdenv; rec {
cp -r _site/* $out
'';
};
+ test = mkDerivation rec {
+ name = "website-test";
+ src = ./.;
+ phases = "unpackPhase buildPhase";
+ buildInputs = [perl];
+ buildPhase = ''
+ mkdir txt
+ podchecker website.pl 2>&1 | tee txt/podchecker.txt
+ mv txt/ $out/
+ '';
+ };
shell = mkShell rec {
# See also the reference documentation:
# https://nixos.org/nixpkgs/manual/#sec-pkgs-mkShell