-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: NPF-2894 add code coverage report
- Loading branch information
Showing
4 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,29 @@ on: | |
- '**' | ||
tags-ignore: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build_ilc: | ||
name: Build ILC | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
branch: | ||
- name: src | ||
ref: ${{ github.ref }} | ||
- name: dest | ||
ref: ${{ github.base_ref }} | ||
exclude: | ||
- branch: | ||
ref: '' | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
ref: ${{ matrix.branch.ref }} | ||
|
||
- uses: benjlevesque/[email protected] | ||
id: sha7 | ||
|
@@ -46,12 +61,29 @@ jobs: | |
run: docker run namecheap/ilc_tmp:$SHA npm run test:ci | ||
|
||
- name: Run server-side tests coverage | ||
run: docker run --volume /artifacts/ilc/.test_output/server:/temporary namecheap/ilc_tmp:$SHA bash -c "npm run test:coverage && mv .nyc_output/* /temporary" | ||
run: docker run --volume $(pwd)/artifacts/ilc/.test_output/server:/temporary namecheap/ilc_tmp:$SHA bash -c "npm run test:coverage && mv .nyc_output/* /temporary" | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: server-side-tests-artifacts | ||
path: /artifacts/ilc/.test_output/server/ | ||
name: ${{ matrix.branch.name }}-server-side-tests-artifacts | ||
path: artifacts/ilc/.test_output/server/ | ||
|
||
# - name: Code Coverage Report | ||
# uses: irongut/[email protected] | ||
# with: | ||
# filename: artifacts/**/cobertura-coverage.xml | ||
# badge: true | ||
# format: markdown | ||
# indicators: true | ||
# output: both | ||
# thresholds: '80 95' | ||
|
||
# - name: Add Coverage PR Comment | ||
# uses: marocchino/sticky-pull-request-comment@v2 | ||
# if: github.event_name == 'pull_request' | ||
# with: | ||
# recreate: true | ||
# path: code-coverage-results.md | ||
|
||
- name: Build the Docker image to test client-side | ||
run: | | ||
|
@@ -145,6 +177,16 @@ jobs: | |
name: e2e-tests-artifacts | ||
path: e2e/.codecept_output | ||
|
||
# coverage_report: | ||
# name: PR Coverage Report | ||
# runs-on: ubuntu-latest | ||
# needs: [build_ilc, build_registry] | ||
# steps: | ||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: client-side-tests-artifacts | ||
# path: /artifacts/ilc/.test_output/client/ | ||
|
||
push_images: | ||
needs: [build_ilc, build_registry, e2e_tests] | ||
name: Push images to registry | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Ignore artifacts: | ||
ilc/public | ||
.nyc_output |
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
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