From 5ee9af65810e54510f629a04848a0824c8d76c55 Mon Sep 17 00:00:00 2001 From: Ron de las Alas Date: Mon, 13 Nov 2023 09:51:09 -0500 Subject: [PATCH] ci: add unit tests --- .github/workflows/ci-cd.yml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 8541d6b7e15..8c9f9da3445 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -69,23 +69,21 @@ jobs: path: static/microbit key: ${{ runner.os }}-microbit-${{ hashFiles('package-lock.json') }} - # test-unit: - # needs: setup - # runs-on: ubuntu-latest - # env: - # JEST_JUNIT_OUTPUT_NAME: unit-results.xml - # steps: - # - uses: actions/checkout@v4 - # - name: Cache NPM dependencies - # uses: actions/cache@v3 - # with: - # path: - # node_modules - # src/generated - # static/microbit - # key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - # - name: Run Unit Tests - # run: npm run test:unit -- --reporters="default" --reporters="jest-junit" --coverage --coverageReporters=text --coverageReporters=lcov --maxWorkers="2" + test-unit: + needs: setup + runs-on: ubuntu-latest + env: + JEST_JUNIT_OUTPUT_NAME: unit-results.xml + steps: + - uses: actions/checkout@v4 + - name: Cache NPM dependencies + uses: actions/cache@v3 + with: + path: + node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + - name: Run Unit Tests + run: npm run test:unit -- --reporters="default" --reporters="jest-junit" --coverage --coverageReporters=text --coverageReporters=lcov --maxWorkers="2" build: needs: setup env: