From 71c929c11008ed21f1784e62a46b8a237b5465f7 Mon Sep 17 00:00:00 2001 From: PacificYield <173040337+PacificYield@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:19:27 +0100 Subject: [PATCH 1/3] style: prettier --- contracts/.prettierignore | 21 +++++++++++++++++++++ contracts/LICENSE.md | 18 +++++++++--------- 2 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 contracts/.prettierignore 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. From e30fe770325f25e4353f97f8f137660feb5b276b Mon Sep 17 00:00:00 2001 From: PacificYield <173040337+PacificYield@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:20:30 +0100 Subject: [PATCH 2/3] ci: linkchecker.yml on all PR --- .github/workflows/linkchecker.yml | 3 +++ mlc_config.json | 1 + 2 files changed, 4 insertions(+) create mode 100644 mlc_config.json 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/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] } From e93791b8b85016d393e241d8898269e9fb30f8ea Mon Sep 17 00:00:00 2001 From: PacificYield <173040337+PacificYield@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:21:57 +0100 Subject: [PATCH 3/3] ci: test workflows --- .github/workflows/test.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/test.yml 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