diff --git a/.github/workflows/webapp.yml b/.github/workflows/webapp.yml index 03c2d68..d9dd7b8 100644 --- a/.github/workflows/webapp.yml +++ b/.github/workflows/webapp.yml @@ -66,12 +66,30 @@ jobs: name: build path: build -# TODO: Generate test job config executing Jest: "npm run test" -# test: -# needs: [lint, build] -# runs-on: ubuntu-latest -# steps: -# ... + test: + needs: [lint, build] + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + - name: Install dependencies + run: | + npm ci + - name: Download build artifact + uses: actions/download-artifact@v3 + with: + name: build + path: build + - name: Run tests + run: npm test + # TODO: Generate test E2E job config executing Cypress "npm run test:e2e" # e2e: @@ -83,7 +101,7 @@ jobs: deploy: # TODO: change when "test" & "e2e" jobs are ready! # needs: [test, e2e] - needs: [lint, build] + needs: [test] permissions: # needs branching/commit contents contents: write