Skip to content

Commit

Permalink
add test job to ci/cd pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
davorpa committed Sep 15, 2022
1 parent 7889624 commit 0a23c2f
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 0a23c2f

Please sign in to comment.