File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 3737 ~/disk-cache
3838 key : repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}-${{ github.run_id }}-${{ github.run_attempt }}
3939
40+ run-tests-with-stack :
41+ name : Run Tests with stack
42+ runs-on : ubuntu-latest
43+ steps :
44+ - uses : actions/checkout@v3
45+ - uses : cachix/install-nix-action@v22
46+ - name : Configure
47+ run : |
48+ mkdir -p ~/repo-cache ~/disk-cache
49+ echo build --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host > .bazelrc.local
50+ - name : Get Stack snapshot install directory
51+ id : stack-snapshot
52+ # NOTE: `stack path` must run at least once prior to caching to ensure the directory
53+ # exists and is populated.
54+ run : |
55+ stack --nix path --snapshot-install-root
56+ echo "dir=$(stack --nix path --snapshot-install-root)" > "${GITHUB_OUTPUT}"
57+ - uses : actions/cache@v4
58+ with :
59+ path : ${{ steps.stack-snapshot.outputs.dir }}
60+ key : ${{ runner.os }}-stack-${{ hashFiles('**/*.cabal') }}
61+ restore-keys : ${{ runner.os }}-stack-
62+ - name : Build
63+ run : |
64+ stack --nix build
65+ - name : Test
66+ if : ${{ runner.os == 'Linux' }}
67+ run : |
68+ stack --nix test
69+
4070 run-tests-with-darwin :
4171 name : Run Tests with darwin runner
4272 runs-on : macos-11
You can’t perform that action at this time.
0 commit comments