diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4e74e4f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Unit Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + name: Hardhat unit test + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Copy .env.example to .env + run: cp .env.example .env + + - name: Environment + uses: actions/setup-node@v3 + with: + node-version: "18.x" + + - name: Copy .env.example to .env + run: cp .env.example .env + + - name: Run tests + run: | + npm install + npm run test + + # - name: Check formatting + # run: | + # npm run prettier:check