diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml index 1a73339f..01c59cd4 100644 --- a/.github/workflows/linkchecker.yml +++ b/.github/workflows/linkchecker.yml @@ -2,6 +2,8 @@ name: Check Markdown links on: pull_request: + branches: + - main push: branches: - main @@ -18,3 +20,4 @@ jobs: with: use-quiet-mode: "yes" use-verbose-mode: "yes" + config-file: "mlc_config.json" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..ea14a3ee --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Pull request tests (contracts) + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: large_ubuntu_32 + strategy: + matrix: + node-version: [20.x] + steps: + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: ${{ matrix.node-version }} + - run: cp ./contracts/.env.example ./contracts/.env + - run: npm --prefix ./contracts ci --include=optional + - run: npm --prefix ./contracts run prettier:check + - name: "npm CI test" + run: npm --prefix ./contracts run test:mock diff --git a/contracts/.prettierignore b/contracts/.prettierignore new file mode 100644 index 00000000..68476e13 --- /dev/null +++ b/contracts/.prettierignore @@ -0,0 +1,21 @@ +# directories +.coverage_artifacts +.coverage_cache +.coverage_contracts +artifacts +build +cache +coverage +dist +node_modules +types + +# files +*.env +*.log +.DS_Store +.pnp.* +coverage.json +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/contracts/LICENSE.md b/contracts/LICENSE.md index c75c5e8d..2e0743ab 100644 --- a/contracts/LICENSE.md +++ b/contracts/LICENSE.md @@ -7,16 +7,16 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or other -materials provided with the distribution. + list of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. 3. Neither the name of ZAMA nor the names of its contributors may be used to endorse -or promote products derived from this software without specific prior written permission. + or promote products derived from this software without specific prior written permission. -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE*. +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE\*. THIS SOFTWARE IS PROVIDED BY THE ZAMA AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL @@ -27,7 +27,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCL NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*In addition to the rights carried by this license, ZAMA grants to the user a non-exclusive, -free and non-commercial license on all patents filed in its name relating to the open-source -code (the "Patents") for the sole purpose of evaluation, development, research, prototyping -and experimentation. \ No newline at end of file +\*In addition to the rights carried by this license, ZAMA grants to the user a non-exclusive, +free and non-commercial license on all patents filed in its name relating to the open-source +code (the "Patents") for the sole purpose of evaluation, development, research, prototyping +and experimentation. diff --git a/mlc_config.json b/mlc_config.json new file mode 100644 index 00000000..fcf96a36 --- /dev/null +++ b/mlc_config.json @@ -0,0 +1 @@ +{ "aliveStatusCodes": [429, 200] }