Skip to content

Add Istanbul instrumentation #222

Add Istanbul instrumentation

Add Istanbul instrumentation #222

Workflow file for this run

name: ci
on:
pull_request:
types: [opened, reopened, synchronize, edited]
jobs:
ci:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
- name: Setup node env πŸ—
uses: actions/setup-node@master
with:
node-version: 16
check-latest: true
cache: 'npm'
- name: Install dependencies πŸ‘¨πŸ»β€πŸ’»
run: npm ci
- name: Run linter πŸ‘€
run: npm run lint
- name: Run tests πŸ§ͺ
run: npm run test-unit
- name: Cypress run
uses: cypress-io/github-action@v5
with:
install: false
start: npm run serve
wait-on: http://localhost:8080/
config-file: cypress.config.js
spec: "tests/e2e/**/*"
record: true
parallel: true
browser: chrome
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo β†’ Settings β†’ Secrets β†’ Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Cypress Screenshots
uses: actions/upload-artifact@v3
# Only capture images on failure
if: failure()
with:
name: cypress-screenshots
path: tests/e2e/screenshots
- name: Upload Cypress Videos
uses: actions/upload-artifact@v3
# Only capture videos on failure
if: failure()
with:
name: cypress-videos
path: tests/e2e/videos
# - name: Run Coverage
# run: npx nyc report --reporter html --reporter text --reporter json-summary --report-dir combined-coverage
- name: Store Artifacts
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: cypress-coverage
- name: Run build bundle πŸ“¦
run: npm run build-bundle