utop/.github/workflows/test-in-nix.yml

34 lines
810 B
YAML

name: Test in Nix
on:
pull_request:
push:
branches:
- master
jobs:
run:
name: Build and test
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
ocaml-compiler:
- 4_11
- 4_12
- 4_13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Nix
uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-21.11
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.nixos.org/
max-jobs = auto
cores = 0
- run: nix-shell --argstr ocamlVersion ${{ matrix.ocaml-compiler }} --run 'dune runtest'