-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (48 loc) · 1.52 KB
/
main.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
45
46
47
48
49
50
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ocaml-compiler:
- ocaml-base-compiler.4.14.1
- ocaml-base-compiler.5.0.0
steps:
- uses: actions/checkout@v3
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
- name: Install dependencies for testing
run: opam install --deps-only --with-test .
- name: Unit test
run: opam exec -- dune runtest
- name: Build Oraft
run: opam exec -- dune build
- uses: actions/setup-ruby@v1
with:
ruby-version: '3.1'
- name: Install SQLite3 dev-tool
run: sudo apt update && sudo apt install -y libsqlite3-dev
- name: Smoke test
run: opam exec -- smoke_test/run.sh
- name: Archive the smoke test logs and status
uses: actions/upload-artifact@v3
if: failure()
with:
name: smoke-test-logs-${{ matrix.ocaml-compiler }}
path: example/oraft-*
- name: Chaos test
run: opam exec -- chaos_test/run.sh
- name: Archive the chaos test logs and status
uses: actions/upload-artifact@v3
if: failure()
with:
name: chaos-test-logs-${{ matrix.ocaml-compiler }}
path: |
chaos_test_*.log
chaos_test/docker/oraft-*/oraft.log
chaos_test/docker/oraft-*/state/log.jsonl