about summary refs log tree commit diff
path: root/tools/nixery/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nixery/.github/workflows')
-rw-r--r--tools/nixery/.github/workflows/build-and-test.yaml27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/nixery/.github/workflows/build-and-test.yaml b/tools/nixery/.github/workflows/build-and-test.yaml
new file mode 100644
index 000000000000..d3f258ffaac4
--- /dev/null
+++ b/tools/nixery/.github/workflows/build-and-test.yaml
@@ -0,0 +1,27 @@
+# Build Nixery, spin up an instance and pull an image from it.
+name: "Build and test Nixery"
+on:
+  push:
+    branches:
+      - master
+  pull_request: {}
+env:
+  NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs/archive/4263ba5e133cc3fc699c1152ab5ee46ef668e675.tar.gz"
+jobs:
+  build-and-test:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Install Nix
+        uses: cachix/install-nix-action@v13
+      - name: Checkout
+        uses: actions/checkout@v2.3.4
+      - name: Prepare environment
+        run: nix-env -f '<nixpkgs>' -iA go
+      - name: Check formatting
+        run: "test -z $(gofmt -l .)"
+      - name: Run `go vet`
+        run: "go vet ./..."
+      - name: Build Nixery
+        run: "nix-build --no-out-link"
+      - name: Run integration test
+        run: scripts/integration-test.sh