From 4d84137d8c80ada47bc627ff815e1724ac3ca246 Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Sun, 20 Aug 2023 17:44:06 +0100 Subject: [PATCH] ci: opam install and run jest tests --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eba50de..7d8473f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,3 +72,42 @@ jobs: - run: npm ci - run: npm run build - run: npm test + + build-melange: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + node-version: + - 16.x + ocaml-compiler: + - 4.14.x + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + + - name: Use OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + opam-pin: false + opam-depext: false + cache-prefix: v2 + + - run: | + opam pin -y -n melange-jest git+https://github.com/melange-community/melange-jest.git + opam pin -y -n melange-webapi git+https://github.com/melange-community/melange-webapi.git + + - run: opam install ./decoders.opam ./melange-decoders.opam --with-test + - run: npx jest _build/default/__tests__