Skip to content

Restore Alex's test coverage without Docker #1

Restore Alex's test coverage without Docker

Restore Alex's test coverage without Docker #1

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
- name: Run tests
shell: bash
run: |
set -euo pipefail
ZLIB_OUT=$(nix eval --raw nixpkgs#zlib.outPath)
ZLIB_DEV=$(nix eval --raw nixpkgs#zlib.dev.outPath)
nix shell \
nixpkgs#ghc \
nixpkgs#cabal-install \
nixpkgs#pkg-config \
nixpkgs#zlib \
nixpkgs#zlib.dev \
--command bash -lc '
set -euo pipefail
export LIBRARY_PATH="'"$ZLIB_OUT"'/lib:${LIBRARY_PATH:-}"
export C_INCLUDE_PATH="'"$ZLIB_DEV"'/include:${C_INCLUDE_PATH:-}"
export PKG_CONFIG_PATH="'"$ZLIB_DEV"'/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
export LDFLAGS="-L'"$ZLIB_OUT"'/lib ${LDFLAGS:-}"
export CPPFLAGS="-I'"$ZLIB_DEV"'/include ${CPPFLAGS:-}"
cabal test all --test-show-details=direct
'