add nix flake, GitHub Actions workflow, fix tests #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Haskell CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Check packages | |
run: | | |
nix flake check | |
- name: Build packages | |
run: | | |
# Build all packages for the current system | |
nix build .# | |
nix build .#web-view | |
- name: Build devShells | |
run: | | |
# Build all devShells for the current system | |
nix develop .#web-view -c cabal test | |
cd example | |
nix develop ..#example -c cabal build |