From 5cf5f764536b0eb113161ea2845dbba9788e3814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Sat, 19 Sep 2020 18:36:34 +0200 Subject: [PATCH] feat: add test ci workflow --- .github/workflows/continuous-integration.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1c1906e..7a30af6 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -34,3 +34,31 @@ jobs: run: yarn --frozen-lockfile - name: Compile Projects run: yarn build + + Testing: + name: Unit Tests + if: "!contains(github.event.head_commit.message, '[skip ci]')" + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node_version: [12, 14] + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - name: Checkout Project + uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node_version }} + - name: Restore CI Cache + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }} + - name: Install Dependencies + run: yarn --frozen-lockfile + - name: Run tests + run: yarn test