Build project and run tests 🚀 #42
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: Build and test | |
run-name: Build project and run tests 🚀 | |
on: | |
- push | |
- pull_request | |
jobs: | |
runtest: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- name: Check out repository code 📔 | |
uses: actions/checkout@v4 | |
- name: Set-up OCaml 🐪 | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: "5.1" | |
- name: Install opam dependencies 🔗 | |
run: opam install . --deps-only --with-test | |
- name: Build the project 🔨 | |
run: opam exec -- dune build | |
- name: Run tests 😏 | |
run: opam exec -- dune runtest |