Skip to content

Upgrade GitHub Actions #77

Upgrade GitHub Actions

Upgrade GitHub Actions #77

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
jobs:
tests:
name: Unit Tests
runs-on: ubuntu-latest
env:
OCAML_JUPYTER_LOG: debug
strategy:
fail-fast: false
matrix:
ocaml-compiler:
- 4.10.0
- 4.11.0
- 4.12.0
- 4.13.0
- ocaml-base-compiler.4.14.0~beta1
steps:
- uses: actions/checkout@v3
- name: Setup OCaml
uses: ocaml/setup-ocaml@master
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
cache-prefix: opam-${{ matrix.ocaml-compiler }}-
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
beta: https://github.com/ocaml/ocaml-beta-repository.git
- name: Install dependencies
run: |
sudo apt-get install -y bash zsh python2 python3 ruby
opam install . -y --deps-only --with-test
opam install 'merlin>3.0.0' -y
- name: Lint for opam files
run: opam lint *.opam
- name: Lint for source files
run: make check-format
- name: Build
run: opam exec -- dune build
- name: Unit tests
run: make unit-test
##
## Integration tests
##
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Install Jupyter
run: pip install jupyter
- name: Install ocaml-jupyter kernel
run: opam pin add jupyter . -y
- name: Install kernelspec
run: |
opam exec -- ocaml-jupyter-opam-genspec
jupyter kernelspec install --user --name ocaml "$(opam config var share)/jupyter"
echo '#use "topfind";;' >> ~/.ocamlinit
- name: Integration tests
run: make integration-test KERNEL_NAME=ocaml