Update README.md #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Web CI | |
on: push | |
jobs: | |
unit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Run Jest tests | |
run: npm test -- --passWithNoTests | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Check Cypress tests exist | |
id: check_cypress_tests | |
uses: andstor/file-existence-action@v1 | |
with: | |
files: "cypress/integration/" | |
- name: Install and run Cypress tests | |
uses: cypress-io/github-action@v2 | |
if: steps.check_cypress_tests.outputs.files_exists == 'true' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
build: npm run build --if-present | |
start: npm start | |
wait-on: 'http://localhost:3000' |