forked from mlms13/bs-decode
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from riKiMasan/melange21
Melange21
- Loading branch information
Showing
32 changed files
with
5,230 additions
and
36,611 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build and test the project | ||
strategy: | ||
matrix: | ||
system: | ||
- ubuntu-latest | ||
node-version: | ||
- 18.x | ||
ocaml-compiler: | ||
- 5.1.x | ||
|
||
runs-on: ${{ matrix.system }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{matrix.node-version}} | ||
|
||
- name: Use OCaml ${{ matrix.ocaml-compiler }} | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
|
||
- name: Install all deps | ||
run: make install | ||
|
||
- name: Build the project | ||
run: make build | ||
|
||
- name: Run tests | ||
run: make test-coverage | ||
|
||
- name: Publish test report to Coveralls | ||
uses: coverallsapp/github-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
project_name = bs-decode | ||
|
||
DUNE = opam exec -- dune | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
.PHONY: help | ||
help: ## Print this help message | ||
@echo "List of available make commands"; | ||
@echo ""; | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'; | ||
@echo ""; | ||
|
||
.PHONY: create-switch | ||
create-switch: ## Create opam switch | ||
opam switch create . -y --deps-only | ||
|
||
.PHONY: init | ||
init: create-switch install ## Configure everything to develop this repository in local | ||
|
||
.PHONY: install | ||
install: ## Install development dependencies | ||
$(DUNE) build @install | ||
yarn install ## install JavaScript packages that the project might depend on, like `react` or `react-dom` | ||
opam update ## make sure that opam has the latest information about published libraries in the opam repository https://opam.ocaml.org/packages/ | ||
opam install -y . --deps-only --with-test ## install the Melange and OCaml dependencies | ||
opam exec opam-check-npm-deps ## check that the versions of the JavaScript packages installed match the requirements defined by Melange libraries | ||
|
||
.PHONY: build | ||
build: ## Build the project | ||
$(DUNE) build @main | ||
|
||
.PHONY: watch | ||
watch: ## Watch for the filesystem and rebuild on every change | ||
$(DUNE) build --watch @main | ||
|
||
.PHONY: clean | ||
clean: ## Clean build artifacts and other generated files | ||
rm test/output/test/utils/BigJson.json | ||
$(DUNE) clean | ||
|
||
.PHONY: copy-test-json | ||
copy-test-json: ## Copy test json files to the right place | ||
cp test/utils/BigJson.json test/output/test/utils/BigJson.json | ||
|
||
.PHONY: test | ||
test: copy-test-json | ||
yarn test | ||
|
||
.PHONY: test-coverage | ||
test-coverage: copy-test-json | ||
yarn test --coverage | ||
|
||
.PHONY: format | ||
format: ## Format the codebase with ocamlformat | ||
$(DUNE) build @fmt --auto-promote | ||
|
||
.PHONY: format-check | ||
format-check: ## Checks if format is correct | ||
$(DUNE) build @fmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
synopsis: "Type-safe JSON decoding for ReasonML and OCaml" | ||
description: "Type-safe JSON decoding for ReasonML and OCaml" | ||
maintainer: ["Michael Martin"] | ||
authors: ["Michael Martin"] | ||
license: "MIT" | ||
homepage: "https://github.com/mlms13/bs-decode" | ||
bug-reports: "https://github.com/mlms13/bs-decode/issues" | ||
depends: [ | ||
"dune" {>= "3.8"} | ||
"dot-merlin-reader" | ||
"melange" {>= "2.0.0"} | ||
"ocaml" {>= "5.1.0"} | ||
"reason" {>= "3.10.0"} | ||
"ocaml-lsp-server" | ||
"relude" | ||
"bastet" | ||
"melange-jest" {>= "0.1.0"} | ||
"opam-check-npm-deps" | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/mlms13/bs-decode.git" | ||
pin-depends: [ | ||
[ "relude.dev" "git+https://github.com/reazen/relude.git#v2" ] | ||
[ "bastet.dev" "git+https://github.com/johnhaley81/bastet.git#6c8f53a9da55254691df49bddf96b279b38be204" ] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pin-depends: [ | ||
[ "relude.dev" "git+https://github.com/reazen/relude.git#v2" ] | ||
[ "bastet.dev" "git+https://github.com/johnhaley81/bastet.git#6c8f53a9da55254691df49bddf96b279b38be204" ] | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.