From ba33b442f427f963a55415ec50310cbfb70a5c7f Mon Sep 17 00:00:00 2001 From: test Date: Sun, 14 Jan 2024 15:11:18 +0800 Subject: [PATCH] Add Ci for smart contracts --- .github/workflows/smart_contracts.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/smart_contracts.yml diff --git a/.github/workflows/smart_contracts.yml b/.github/workflows/smart_contracts.yml new file mode 100644 index 0000000..a14afa0 --- /dev/null +++ b/.github/workflows/smart_contracts.yml @@ -0,0 +1,38 @@ +name: Smart Contracts CI + +on: + push: + branches: + - master + pull_request: + + +jobs: + hardhat: + strategy: + fail-fast: true + + name: Hardhat project + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./contracts + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup Node 16 + uses: actions/setup-node@v3 + with: + node-version: "16.x" + cache: "npm" + + - name: Install Node dependencies + run: | + yarn install + + - name: Run Hardhat tests + run: | + yarn test + id: hardhat-test