Skip to content

Commit 274f135

Browse files
wing328kpy3
authored andcommitted
Add github workflow for OCaml samples (OpenAPITools#20802)
* add github workflow for ocaml sample * trigger build * test with 5 * install dune * install yojson * install others * install * add name * trigger build failure * Revert "trigger build failure" This reverts commit be35b26. * test with 5 * pin versions
1 parent 8364a00 commit 274f135

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/samples-ocaml.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Samples OCaml
2+
3+
on:
4+
push:
5+
paths:
6+
- 'samples/client/petstore/ocaml/**'
7+
pull_request:
8+
paths:
9+
- 'samples/client/petstore/ocaml/**'
10+
11+
jobs:
12+
build:
13+
name: Build OCaml
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
sample:
19+
- 'samples/client/petstore/ocaml/'
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set-up OCaml
23+
uses: ocaml/setup-ocaml@v3
24+
with:
25+
ocaml-compiler: 5
26+
- name: Install
27+
run: opam install . --deps-only --with-test
28+
working-directory: ${{ matrix.sample }}
29+
- name: Install Misc
30+
run: opam install dune ppx_deriving_yojson conf-libev lwt cohttp-lwt-unix.5.3.0 cohttp-async.5.3.0
31+
working-directory: ${{ matrix.sample }}
32+
- name: Build
33+
run: opam exec -- dune build
34+
working-directory: ${{ matrix.sample }}

samples/client/petstore/ocaml/.openapi-generator-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
#docs/*.md
2222
# Then explicitly reverse the ignore rule for a single file:
2323
#!docs/README.md
24+
#

0 commit comments

Comments
 (0)