Skip to content

Commit ed9a72c

Browse files
committed
Update .envrc and github workflows
1 parent 7bb4388 commit ed9a72c

File tree

4 files changed

+25
-49
lines changed

4 files changed

+25
-49
lines changed

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
use nix
1+
use flake

.github/workflows/ci.yaml

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -42,65 +42,36 @@ jobs:
4242
4343
- name: Prepare nix shell
4444
run:
45-
nix develop --accept-flake-config --build
45+
nix develop --build
46+
47+
- name: Formatting
48+
run:
49+
nix develop --command fourmolu --mode check .
4650

4751
- name: Build
4852
run: |
49-
nix develop --accept-flake-config --command cabal update
50-
nix develop --accept-flake-config --command cabal build all --ghc-options=-Werror
53+
nix develop --command cabal update
54+
nix develop --command cabal build all --ghc-options=-Werror
5155
5256
- name: Test
5357
run:
54-
nix develop --accept-flake-config --command cabal test all
55-
56-
- name: Formatting
57-
run:
58-
nix develop --accept-flake-config --command fourmolu --mode check .
59-
60-
haddock:
61-
name: "Haddock & benchmarks"
62-
runs-on: ubuntu-latest
63-
64-
steps:
65-
- uses: actions/checkout@v2.3.1
66-
with:
67-
repository: input-output-hk/quickcheck-dynamic
68-
69-
- name: Prepare nix
70-
uses: cachix/install-nix-action@v22
71-
with:
72-
extra_nix_config: |
73-
accept-flake-config = true
74-
75-
- name: Github cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
76-
uses: actions/cache@v4
77-
with:
78-
path: |
79-
~/.cabal/packages
80-
~/.cabal/store
81-
dist-newstyle
82-
key: |
83-
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
58+
nix develop --command cabal test all
8459

8560
- name: Documentation (Haddock)
8661
run: |
87-
nix develop --accept-flake-config --command .github/workflows/ci-haddock.sh
62+
nix develop --command .github/workflows/ci-haddock.sh
8863
89-
- name: Upload build & test artifacts
64+
- name: Upload Documentation
9065
uses: actions/upload-artifact@v4
9166
with:
9267
name: haddocks
9368
path: ./docs
9469

9570
documentation:
9671
name: Documentation
97-
needs: [haddock]
72+
needs: [build-test]
9873
runs-on: ubuntu-latest
9974
steps:
100-
- uses: actions/checkout@v2.3.1
101-
with:
102-
repository: input-output-hk/quickcheck-dynamic
103-
10475
- name: Download generated documentation
10576
uses: actions/download-artifact@v4
10677
with:

.github/workflows/publish.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ jobs:
1111
uses: dawidd6/action-download-artifact@v2
1212
with:
1313
workflow: release.yaml
14-
name: quickcheck-dynamic.tar.gz
14+
name: distribution
15+
1516
- uses: haskell-actions/hackage-publish@v1
1617
with:
1718
hackageToken: ${{ secrets.HACKAGE }}
1819
packagesPath: '.'
20+
docsPath: '.'
1921
publish: true

.github/workflows/release.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
log-lines = 1000
2626
2727
- name: Github cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
28-
uses: actions/cache@v2.1.5
28+
uses: actions/cache@v4
2929
with:
3030
path: |
3131
~/.cabal/packages
@@ -36,16 +36,17 @@ jobs:
3636
3737
- name: Prepare nix shell
3838
run:
39-
nix develop --accept-flake-config --build
39+
nix develop --build
4040

4141
- name: Cabal check
4242
run: |
4343
cd quickcheck-dynamic
44-
nix develop --accept-flake-config --command cabal check
44+
nix develop --command cabal check
4545
4646
- name: Package
47-
run:
48-
nix develop --accept-flake-config --command cabal sdist quickcheck-dynamic
47+
run: |
48+
nix develop --command cabal sdist quickcheck-dynamic
49+
nix develop --command cabal haddock --haddock-for-hackage quickcheck-dynamic
4950
5051
- name: Get the version
5152
id: get_version
@@ -54,5 +55,7 @@ jobs:
5455
- name: Upload distribution
5556
uses: actions/upload-artifact@v2
5657
with:
57-
name: quickcheck-dynamic.tar.gz
58-
path: ./dist-newstyle/sdist/quickcheck-dynamic-${{ steps.get_version.outputs.VERSION }}.tar.gz
58+
name: distribution
59+
path: |
60+
./dist-newstyle/sdist/quickcheck-dynamic-${{ steps.get_version.outputs.VERSION }}.tar.gz
61+
./dist-newstyle/quickcheck-dynamic-${{ steps.get_version.outputs.VERSION }}-docs.tar.gz

0 commit comments

Comments
 (0)