-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.32 KB
/
ci.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build and Test
on:
pull_request:
push:
permissions: read-all
jobs:
build_and_test:
env:
SABIHIN_DB_USERNAME: purefunctor
SABIHIN_DB_PASSWORD: purefunctor
strategy:
fail-fast: false
matrix:
os:
# - macos-latest
- ubuntu-latest
ocaml-compiler:
- "5.1"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v5
with:
username: ${{ env.SABIHIN_DB_USERNAME }}
password: ${{ env.SABIHIN_DB_PASSWORD }}
database: ${{ env.SABIHIN_DB_USERNAME }}
port: 5432
id: postgres
- name: Install Node 21
uses: actions/setup-node@v4
with:
node-version: 21
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: true
- name: Install OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Install Dependencies
run: opam install . --deps-only --with-test
- name: Build Project
run: opam exec -- dune build
- name: Run Tests
run: opam exec -- dune runtest
- name: Run JS Tests
run: pnpm test:js