Skip to content

Fixed GitHub workflows #97

Fixed GitHub workflows

Fixed GitHub workflows #97

Workflow file for this run

name: Builds, tests & co
on:
- pull_request
- push
- workflow_dispatch
permissions: read-all
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tree
uses: actions/checkout@v5
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
- run: opam install . --deps-only --with-test
- run: opam exec -- dune build
- run: opam exec -- dune runtest
lint-doc:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v5
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
- uses: ocaml/setup-ocaml/lint-doc@v3
lint-fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v5
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
- uses: ocaml/setup-ocaml/lint-fmt@v3
lint-opam:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v5
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
- uses: ocaml/setup-ocaml/lint-opam@v3
hooks:
runs-on: ubuntu-latest
steps:
# Set up Python with built-in pip caching
- name: Set up Python
id: python
uses: actions/setup-python@v6
with:
python-version: "3.13"
# Cache pre-commit’s virtual envs + hook repos
- name: Cache pre-commit envs
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: >
${{ format('pre-commit-{0}-{1}',
steps.python.outputs.python-version,
hashFiles('.pre-commit-config.yaml')) }}
# Install the tool itself
- name: Install pre-commit
run: |
pip install --upgrade pip pre-commit
pre-commit install
# Run all hooks not already handled by other workflows
- name: Run hooks
run: |
pre-commit run --all-files --show-diff-on-failure --color=always