Skip to content

Commit d645252

Browse files
committed
Enter nix shell in CI
1 parent fcb61ce commit d645252

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,25 @@ jobs:
4040
restore-keys: |
4141
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
4242
43-
- name: Prepare nix shell
44-
run:
45-
nix develop --build
43+
- name: Enter nix shell
44+
uses: nicknovitski/nix-develop@v1
4645

4746
- name: Formatting
4847
run:
49-
nix develop --command fourmolu --mode check .
48+
fourmolu --mode check .
5049

5150
- name: Build
5251
run: |
53-
nix develop --command cabal update
54-
nix develop --command cabal build all --ghc-options=-Werror
52+
cabal update
53+
cabal build all --ghc-options=-Werror
5554
5655
- name: Test
5756
run:
58-
nix develop --command cabal test all
57+
cabal test all
5958

6059
- name: Documentation (Haddock)
6160
run: |
62-
nix develop --command .github/workflows/ci-haddock.sh
61+
.github/workflows/ci-haddock.sh
6362
6463
- name: Upload Documentation
6564
uses: actions/upload-artifact@v4

.github/workflows/release.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,18 @@ jobs:
3434
key: |
3535
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
3636
37-
- name: Prepare nix shell
38-
run:
39-
nix develop --build
37+
- name: Enter nix shell
38+
uses: nicknovitski/nix-develop@v1
4039

4140
- name: Cabal check
4241
run: |
4342
cd quickcheck-dynamic
44-
nix develop --command cabal check
43+
cabal check
4544
4645
- name: Package
4746
run: |
48-
nix develop --command cabal sdist quickcheck-dynamic
49-
nix develop --command cabal haddock --haddock-for-hackage quickcheck-dynamic
47+
cabal sdist quickcheck-dynamic
48+
cabal haddock --haddock-for-hackage quickcheck-dynamic
5049
5150
- name: Get the version
5251
id: get_version

0 commit comments

Comments
 (0)