Skip to content

chore: Replace haskell.nix with stacklock2nix #294

chore: Replace haskell.nix with stacklock2nix

chore: Replace haskell.nix with stacklock2nix #294

Workflow file for this run

---
name: Build
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
runner:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v16
with:
name: devenv
- run: nix profile install nixpkgs#devenv
- uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('hapistrano.cabal') }}
restore-keys: |
${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-
${{ runner.os }}-stack-global-
- name: Install dependencies
run: devenv shell -- stack build --only-dependencies --test
- uses: actions/cache@v4
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('hapistrano.cabal') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('hapistrano.cabal') }}-
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-
${{ runner.os }}-stack-work-
- name: Compile code
run: devenv shell -- stack build --test --no-run-tests
- name: Run tests
run: devenv shell -- stack test
nix-build:
if: false
strategy:
matrix:
runner:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v16
with:
name: stackbuilders
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: nix build
docker:
if: false
uses: ./.github/workflows/reusable-docker.yml
with:
push: false