-
Notifications
You must be signed in to change notification settings - Fork 16
47 lines (39 loc) · 1.3 KB
/
nix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CI
on:
pull_request:
push:
branches: [master]
jobs:
nix-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Run Nix Flake Check
run: nix flake check
- name: Build library and generate haddock
run: |
nix build .\#nvfetcher-lib.out.doc
cp -r ./result-doc/share/doc/nvfetcher-*/html/ docs
- name: Run spec tests
run: |
nix develop --command cabal update
nix develop --command cabal test
- name: Run CLI with nvfetcher_example.toml
run : nix shell --command nvfetcher --config nvfetcher_example.toml
- name: Eval generated.nix
run : nix eval -f _sources/generated.nix
- name: Cleanup
run: rm -r _sources
- name: Run Main_example.hs
run: nix develop .\#ghcWithNvfetcher --command runghc Main_example.hs
- name: Deploy generated haddock to github pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.repository_owner == 'berberman' && github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
cname: nvfetcher.torus.icu