Updated workflow for code coverage
- added separate Admin codecov step - removed unit test until we figure out handling for partial runs
This commit is contained in:
parent
e1fbfd3e12
commit
92120324eb
12
.github/codecov.yml
vendored
12
.github/codecov.yml
vendored
@ -5,16 +5,16 @@ coverage:
|
|||||||
patch: false
|
patch: false
|
||||||
project:
|
project:
|
||||||
default: false
|
default: false
|
||||||
|
admin-tests:
|
||||||
|
flags:
|
||||||
|
- admin-tests
|
||||||
|
threshold: 0.2%
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
flags:
|
flags:
|
||||||
- e2e-tests
|
- e2e-tests
|
||||||
threshold: 0.2%
|
threshold: 0.2%
|
||||||
unit-tests:
|
|
||||||
flags:
|
|
||||||
- unit-tests
|
|
||||||
threshold: 0.2%
|
|
||||||
flags:
|
flags:
|
||||||
|
admin-tests:
|
||||||
|
carryforward: true
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
carryforward: true
|
carryforward: true
|
||||||
unit-tests:
|
|
||||||
carryforward: true
|
|
||||||
|
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
@ -191,7 +191,8 @@ jobs:
|
|||||||
BROWSER: Chrome
|
BROWSER: Chrome
|
||||||
|
|
||||||
# Merge coverage reports and upload
|
# Merge coverage reports and upload
|
||||||
- run: yarn ember coverage-merge
|
- name: Merge Admin test coverage
|
||||||
|
run: yarn ember coverage-merge
|
||||||
working-directory: ghost/admin
|
working-directory: ghost/admin
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@ -660,36 +661,40 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Restore Admin coverage
|
- name: Restore Admin coverage
|
||||||
|
if: contains(needs.job_admin-tests.result, 'success')
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: admin-coverage
|
name: admin-coverage
|
||||||
|
|
||||||
|
- name: Move coverage
|
||||||
|
if: contains(needs.job_admin-tests.result, 'success')
|
||||||
|
run: |
|
||||||
|
rsync -av --remove-source-files admin/* ghost/admin
|
||||||
|
|
||||||
|
- name: Upload Admin test coverage
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
flags: admin-tests
|
||||||
|
move_coverage_to_trash: true
|
||||||
|
|
||||||
- name: Restore E2E coverage
|
- name: Restore E2E coverage
|
||||||
|
if: contains(needs.job_database-tests.result, 'success')
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: e2e-coverage
|
name: e2e-coverage
|
||||||
|
|
||||||
- name: Move coverage
|
- name: Move coverage
|
||||||
|
if: contains(needs.job_database-tests.result, 'success')
|
||||||
run: |
|
run: |
|
||||||
rsync -av --remove-source-files admin/* ghost/admin
|
|
||||||
rsync -av --remove-source-files core/* ghost/core
|
rsync -av --remove-source-files core/* ghost/core
|
||||||
|
|
||||||
- name: Upload E2E test coverage
|
- name: Upload E2E test coverage
|
||||||
|
if: contains(needs.job_database-tests.result, 'success')
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
flags: e2e-tests
|
flags: e2e-tests
|
||||||
move_coverage_to_trash: true
|
move_coverage_to_trash: true
|
||||||
|
|
||||||
- name: Restore Unit test coverage
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: unit-coverage
|
|
||||||
path: coverage
|
|
||||||
- run: rsync -av --remove-source-files coverage/* ghost/
|
|
||||||
- name: Upload unit test coverage
|
|
||||||
uses: codecov/codecov-action@v3
|
|
||||||
with:
|
|
||||||
flags: unit-tests
|
|
||||||
|
|
||||||
job_required_tests:
|
job_required_tests:
|
||||||
name: All required tests passed or skipped
|
name: All required tests passed or skipped
|
||||||
needs:
|
needs:
|
||||||
|
Loading…
Reference in New Issue
Block a user