-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Adding code coverage reports pipeline (#1286)
Signed-off-by: Dominik Jelinek <[email protected]>
- Loading branch information
Showing
4 changed files
with
59 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: 📊 Code Coverage | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CODE_TYPE: stable | ||
CODE_VERSION: max | ||
TEST_RESOURCES: test-resources | ||
|
||
steps: | ||
- name: 👷🏻 Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⚙️ Setup NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: npm | ||
|
||
- name: 🔧 Install | ||
run: npm ci | ||
|
||
- name: 🔧 Build | ||
run: npm run build | ||
|
||
- name: 🔧 Install - Test Project | ||
run: npm install --workspace=extester-test | ||
|
||
- name: 📊 Run Tests with Coverage enabled | ||
# 'set +e' and 'exit 0' - that means the workflow will not fail even the test failures are present. The failing tests are not directive for the code coverage reports itself | ||
run: | | ||
set +e | ||
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run test:coverage | ||
exit 0 | ||
- name: 💾 Upload Coverage | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: coverage | ||
path: ${{ github.workspace }}/tests/**/coverage |
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
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