-
Notifications
You must be signed in to change notification settings - Fork 285
44 lines (35 loc) · 1.09 KB
/
format.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Check format
on:
pull_request:
branches:
- master
- 'feature/**'
- '*-lcm'
jobs:
ocaml-format:
name: Ocaml files
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pull configuration from xs-opam
run: |
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/release/yangtze/lcm/tools/xs-opam-ci.env | cut -f2 -d " " > .env
- name: Load environment file
id: dotenv
uses: falti/dotenv-action@v1
- name: Update Ubuntu repositories
run: sudo apt-get update
- name: Use ocaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ steps.dotenv.outputs.ocaml_version_full }}
opam-repositories: |
xs-opam: ${{ steps.dotenv.outputs.repository }}
dune-cache: true
opam-pin: false
opam-depext: false
- name: Install ocamlformat
run: opam install ocamlformat
- name: Check whether `make format` was run
run: opam exec -- dune build @fmt