From 66a1877012072ffbe1a5c49a7b3d7613291c195a Mon Sep 17 00:00:00 2001 From: Liuhaai Date: Wed, 9 Oct 2024 13:53:34 -0700 Subject: [PATCH] update check --- .github/workflows/check.yml | 12 ++++++------ Makefile | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c28f3f90..e8659fe0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -23,13 +23,13 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - # - name: Setup Node.js - # uses: actions/setup-node@v4 - # with: - # node-version: '21.x' + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '21.x' - # - name: Run tests for smart-contract - # run: make contract_test + - name: Run tests for smart-contract + run: make contract-test - name: Setup Go uses: actions/setup-go@v3 diff --git a/Makefile b/Makefile index 73a759ea..0e27894e 100644 --- a/Makefile +++ b/Makefile @@ -41,3 +41,7 @@ test: .PHONY: clean clean: @rm -rf $(BUILD_DIR) + +contract-test: + @cd smartcontracts && npm install --save-dev hardhat + @cd smartcontracts && npx hardhat test \ No newline at end of file