Skip to content

chore: use nix in ci #83

chore: use nix in ci

chore: use nix in ci #83

Workflow file for this run

name: Haskell CI
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
nix-ci:
runs-on: ubuntu-latest
env:
NIX_CONFIG: accept-flake-config = true
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Enable Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Show toolchain versions from nix shell
shell: bash
run: |
nix develop --command bash -lc 'ghc --numeric-version'
nix develop --command bash -lc 'cabal --numeric-version'
nix develop --command bash -lc 'stack --numeric-version || true'
nix develop --command bash -lc 'fourmolu --version'
- name: Check formatting
run: nix develop --command make format-check
- name: Check cabal file
run: nix develop --command make cabal-check
- name: Configure the build
run: nix develop --command make configure
- name: Build dependencies
run: nix develop --command make deps
- name: Build the package
run: nix develop --command make build
- name: Run tests
run: nix develop --command make test
- name: Build documentation
run: nix develop --command make docs