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