about summary refs log tree commit diff
path: root/tools/nixery
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2021-04-27T14·28+0200
committerVincent Ambo <mail@tazj.in>2021-04-28T20·50+0200
commitd2767bbe8a7af403e4e252f3fbfe9ec8fa0c5a90 (patch)
tree660d240aea044d8e9fadf740546f01d5ad0f0096 /tools/nixery
parentf172107ef1b2568bd3a1b1eafa4b9e2546e14c1d (diff)
feat(ci): Configure initial GitHub Actions setup
Travis is being deprecated, and this might be the best option for now.
Diffstat (limited to 'tools/nixery')
-rw-r--r--tools/nixery/.github/workflows/build-and-test.yaml29
1 files changed, 29 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..79dd54a71ea5
--- /dev/null
+++ b/tools/nixery/.github/workflows/build-and-test.yaml
@@ -0,0 +1,29 @@
+# Build Nixery, spin up an instance and pull an image from it.
+name: "Build and test Nixery"
+on:
+  push:
+    branches:
+      - master
+  pull_request: {}
+permissions: "read-all"
+env:
+  NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/0a40a3999eb4d577418515da842a2622a64880c5.tar.gz"
+jobs:
+  build-and-test:
+    runs-on: ubuntu-latest
+    steps:
+      - name: "Do we have Docker?"
+        run: |
+          docker ps -a
+      - name: Install Nix
+        uses: cachix/install-nix-action@v13
+      - name: Checkout
+        uses: actions/checkout@v2.3.4
+      - name: Prepare environment
+        run: |
+          mkdir test-storage
+          nix-env -f '<nixpkgs>' -iA go
+      - name: Check formatting
+        run: "test -z $(gofmt -l .)"
+      - name: Build Nixery
+        run: "nix-build --arg maxLayers 2"