Skip to content

Commit

Permalink
Merge pull request xapi-project#4475 from psafont/stockform
Browse files Browse the repository at this point in the history
  • Loading branch information
psafont authored Jul 27, 2021
2 parents 75f8d27 + 46368d6 commit 8fe3cdc
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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@v2

- name: Pull configuration from xs-opam
run: |
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/release/stockholm/lcm/tools/xs-opam-ci.env | cut -f2 -d " " > .env
- name: Load environment file
id: dotenv
uses: falti/[email protected]

- name: Use ocaml
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ steps.dotenv.outputs.ocaml_version_full }}
opam-repository: ${{ steps.dotenv.outputs.repository }}

- name: Install ocamlformat
run: |
opam update
opam install ocamlformat
- name: Check whether `make format` was run
run: opam exec -- dune build @fmt

0 comments on commit 8fe3cdc

Please sign in to comment.