]> git.immae.eu Git - github/fretlink/clever-tools-nix.git/commitdiff
ci: check ALL versions during tests
authorPaul B <paul@bonaud.fr>
Thu, 2 Apr 2020 08:12:12 +0000 (10:12 +0200)
committerPaul B <paul@bonaud.fr>
Thu, 2 Apr 2020 08:15:22 +0000 (10:15 +0200)
.travis.yml
README.md
check.sh [deleted file]
scripts/check.nix [new file with mode: 0644]
scripts/check.sh [new file with mode: 0755]

index 8b81afcd63c2163aad55da8806c84d6fa91999e6..d0550a7ef1c38e0c9a58ec8eef3b214463ab8d74 100644 (file)
@@ -2,8 +2,9 @@
 language: nix
 
 script:
- - nix-env -i -f default.nix -A latest
- - ./check.sh .
+  - nix-build --no-out-link scripts/check.nix
+  - nix-env -i -f default.nix -A latest
+  - ./scripts/check.sh .
 
 notifications:
   slack: fretlink:pTIylIN7zkwRFuL3aHERmsbB
index 9d744f5a395f58c203421e8c2a474f38fedb70b5..c4a13e7d58fd6ae9051c44471be479e47a5ce1d9 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,4 +16,4 @@ Once you've done that, add a `mkOlderVersion` for the previous latest version. O
 
 Then, run `nix build`. It will give you the correct values for the hashes. Correct those, run it again and you'll see `result-` directories, one per version. Go ahead and make sure they all work.
 
-Finally, don't forget to update `check.sh` with the latest version number.
+Finally, don't forget to update `scripts/check.sh` with the latest version number.
diff --git a/check.sh b/check.sh
deleted file mode 100755 (executable)
index 92faac7..0000000
--- a/check.sh
+++ /dev/null
@@ -1 +0,0 @@
-[ "$(clever --version)" == "1.6.3" ]
diff --git a/scripts/check.nix b/scripts/check.nix
new file mode 100644 (file)
index 0000000..1a344c6
--- /dev/null
@@ -0,0 +1,4 @@
+with import <nixpkgs> {};
+
+# Check all versions
+lib.collect lib.isDerivation (callPackage ../default.nix {})
diff --git a/scripts/check.sh b/scripts/check.sh
new file mode 100755 (executable)
index 0000000..ffef74b
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+[ "$(clever --version)" = "1.6.3" ]