chore: prepare the release of the stable 4.0 version #74
Workflow file for this run
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
# Generate code coverage reports and uploads them to Codecov | |
name: 🐛 Code coverage | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
generate: | |
name: Generate coverage reports | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
defaults: | |
run: | |
shell: bash | |
outputs: | |
reports_path: ${{ steps.list_reports_path.outputs.reports_path }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
- name: Install | |
run: node common/scripts/install-run-rush.js install | |
- name: 🏗 Build | |
run: node common/scripts/install-run-rush.js rebuild | |
- name: 🐛 Test | |
run: node common/scripts/install-run-rush.js test --coverage | |
- name: List module names for which a coverage report has been generated | |
id: list_reports_path | |
# directories_names is an array of strings formatted like that: ./modules/common/coverage. | |
# syntax checked with https://www.shellcheck.net/ | |
# https://yaml-multiline.info/ | |
run: | | |
reports_path=$(find ./modules -name clover.xml | tr '\n' ',') | |
echo "reports_path=$reports_path" >> "$GITHUB_OUTPUT" | |
- name: ⤒ Upload coverage reports | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
files: ${{ steps.list_reports_path.outputs.reports_path }} |