From 6f4847083ce87a1cb083df3ce9b04f2cf0bc7571 Mon Sep 17 00:00:00 2001 From: Gabriel Thom <61333600+thomgabriel@users.noreply.github.com> Date: Wed, 22 Nov 2023 16:18:51 -0300 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..89567f9 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: Tests + +on: + push: + branches: + - main + pull_request: + +jobs: + unit-tests: + name: Unit Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + + - id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn- + + - name: Install dependencies + run: yarn install --frozen-lockfile + + # This is required separately from yarn test because it generates the typechain definitions + - name: Compile + run: yarn compile + + - name: Run unit tests + run: yarn test