Skip to content

Run Codecov Workflow only when PR is ready #1

Run Codecov Workflow only when PR is ready

Run Codecov Workflow only when PR is ready #1

Workflow file for this run

name: code coverage
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
run-codecov:
if: github.event.pull_request.draft == false
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "21"
- name: Install dependencies
run: npm install jest
- name: Run Jest tests
run: npm run test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage/coverage-final.json
flags: unit
fail_ci_if_error: ${{ github.repository == 'e-mission/e-mission-phone' }}