summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2022-03-20 22:13:24 +0100
committerGitHub <noreply@github.com>2022-03-20 22:13:24 +0100
commit301c5460413b15f3a930ac820f1dd0509744ab1d (patch)
tree80ba8eda911078fd7490ee89b8bf42c26f700166 /.github
parent78eeac7d80b45e02076afe77894d36713795fa45 (diff)
fix(ci): scope nix workflows (#1248)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/nix-develop.yml61
-rw-r--r--.github/workflows/nix.yml47
2 files changed, 61 insertions, 47 deletions
diff --git a/.github/workflows/nix-develop.yml b/.github/workflows/nix-develop.yml
new file mode 100644
index 000000000..4c84119a9
--- /dev/null
+++ b/.github/workflows/nix-develop.yml
@@ -0,0 +1,61 @@
+# This is a workflow, consisting of jobs that only need to be run,
+# once `*nix`, or `flake.lock` files change
+name: nix-develop
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - '**.nix'
+ - 'flake.lock'
+ pull_request:
+ branches:
+ - main
+ paths:
+ - '**.nix'
+ - 'flake.lock'
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ name: "nix check"
+ environment: cachix
+ timeout-minutes: 5
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ # Nix Flakes doesn't work on shallow clones
+ fetch-depth: 0
+ - uses: cachix/install-nix-action@v16
+ with:
+ fetch-depth: 0
+ - uses: cachix/cachix-action@v10
+ with:
+ name: zellij
+ # If you chose API tokens for write access OR if you have a private cache
+ authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
+ - run: nix develop .#fmtShell --command treefmt --fail-on-change
+ ## nix flake check still fails on IFD
+ #- run: nix flake check --print-build-logs --show-trace
+ develop:
+ runs-on: ubuntu-latest
+ name: "nix develop"
+ environment: cachix
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ # Nix Flakes doesn't work on shallow clones
+ fetch-depth: 0
+ - uses: cachix/install-nix-action@v16
+ with:
+ extra_nix_config: |
+ experimental-features = nix-command flakes
+ fetch-depth: 0
+ - uses: cachix/cachix-action@v10
+ with:
+ name: zellij
+ # If you chose API tokens for write access OR if you have a private cache
+ authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
+ - run: nix develop --profile devShell
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
index afc329c5d..09646d3fd 100644
--- a/.github/workflows/nix.yml
+++ b/.github/workflows/nix.yml
@@ -9,30 +9,6 @@ on:
- main
jobs:
- check:
- runs-on: ubuntu-latest
- name: "nix check"
- environment: cachix
- timeout-minutes: 5
- steps:
- - uses: actions/checkout@v3
- with:
- # Nix Flakes doesn't work on shallow clones
- fetch-depth: 0
- - uses: cachix/install-nix-action@v16
- with:
- extra_nix_config: |
- experimental-features = nix-command flakes
- fetch-depth: 0
- - uses: cachix/cachix-action@v10
- with:
- name: zellij
- # If you chose API tokens for write access OR if you have a private cache
- authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- - run: nix develop .#fmtShell --command treefmt --fail-on-change
- ## nix flake check still fails on IFD
- #- run: nix flake check --print-build-logs --show-trace
-
build:
runs-on: ubuntu-latest
name: "nix build"
@@ -45,8 +21,6 @@ jobs:
fetch-depth: 0
- uses: cachix/install-nix-action@v16
with:
- extra_nix_config: |
- experimental-features = nix-command flakes
fetch-depth: 0
- uses: cachix/cachix-action@v10
with:
@@ -54,24 +28,3 @@ jobs:
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build
- develop:
- runs-on: ubuntu-latest
- name: "nix develop"
- environment: cachix
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v3
- with:
- # Nix Flakes doesn't work on shallow clones
- fetch-depth: 0
- - uses: cachix/install-nix-action@v16
- with:
- extra_nix_config: |
- experimental-features = nix-command flakes
- fetch-depth: 0
- - uses: cachix/cachix-action@v10
- with:
- name: zellij
- # If you chose API tokens for write access OR if you have a private cache
- authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- - run: nix develop --profile devShell