Skip to content

haskell.nix integration #662

haskell.nix integration

haskell.nix integration #662

Workflow file for this run

name: 🧪 Tests (Nix)
# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
push:
branches: [main]
jobs:
stack:
name: 🖥️ ${{ matrix.os }} ❄️ Nix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- uses: actions/checkout@v3
name: 📤 Checkout
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'
- uses: cachix/install-nix-action@v20
name: ❄️ Set up Nix
with:
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
substituters = https://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- uses: cachix/cachix-action@v12
name: 🧰 Cachix
with:
name: fission-codes
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- uses: actions/cache@v3
name: 🗄️ Cache ~/.stack
with:
path: ~/.stack
key: ${{ matrix.os }}-stack-nix-${{ hashFiles('stack.yaml.lock', 'flake.lock') }}
- name: 🧪 Test
run: |
nix-shell --command quality