From 320624e64e5f9b8aca63ccc0f3cae7c5aab5f9d2 Mon Sep 17 00:00:00 2001 From: Zvonimir Date: Wed, 26 Feb 2025 13:14:56 +0100 Subject: [PATCH] Add test github action --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..779a665a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Hardhat tests +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + name: Hardhat tests + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Use Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: 'npm' + + - name: Cache node modules + id: cache-node-modules + uses: actions/cache@v3 + with: + path: 'node_modules' + key: node-modules-${{ hashFiles('package-lock.json') }} + + - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm ci + + - name: Run tests + run: npx hardhat test