2022-03-10 14:17:01 +01:00
|
|
|
name: Test coverage
|
|
|
|
on:
|
|
|
|
pull_request: {}
|
|
|
|
push:
|
|
|
|
branches: [develop, main, master]
|
|
|
|
jobs:
|
|
|
|
test-coverage:
|
|
|
|
runs-on: ubuntu-latest
|
2022-03-11 11:26:42 +01:00
|
|
|
env:
|
2022-03-11 14:00:56 +01:00
|
|
|
# This must be set for fetchdep.sh to get the right branch
|
2022-03-11 11:26:42 +01:00
|
|
|
PR_NUMBER: ${{github.event.number}}
|
2022-03-10 14:17:01 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2022-03-28 14:17:04 +02:00
|
|
|
with:
|
|
|
|
# If this is a pull request, make sure we check out its head rather than the
|
|
|
|
# automatically generated merge commit, so that the coverage diff excludes
|
|
|
|
# unrelated changes in the base branch
|
2022-03-30 14:02:34 +02:00
|
|
|
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
|
2022-03-10 14:17:01 +01:00
|
|
|
|
|
|
|
- name: Yarn cache
|
|
|
|
uses: c-hive/gha-yarn-cache@v2
|
|
|
|
|
|
|
|
- name: Install Deps
|
|
|
|
run: "./scripts/ci/install-deps.sh --ignore-scripts"
|
|
|
|
|
|
|
|
- name: Run tests with coverage
|
2022-03-28 23:24:02 +02:00
|
|
|
run: "yarn install && yarn coverage"
|
2022-03-10 14:17:01 +01:00
|
|
|
|
|
|
|
- name: Upload coverage
|
|
|
|
uses: codecov/codecov-action@v2
|
|
|
|
with:
|
2022-03-14 12:01:02 +01:00
|
|
|
fail_ci_if_error: false
|
2022-03-10 14:17:01 +01:00
|
|
|
verbose: true
|