diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000000..f39890bba5c --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,74 @@ +name: Coverage Reporting + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + + +jobs: + coverage: + name: Check coverage and report to Coveralls + runs-on: ubuntu-24.04 + steps: + + - uses: actions/checkout@v5 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 22.20.0 + + - name: Install dependencies + run: npm ci + + - name: Check coverage + run: npm run coverage + + - name: Send report to Coveralls for package @ui5/builder + uses: coverallsapp/github-action@v2.3.6 + continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down) + with: + file: packages/builder/coverage/lcov.info + base-path: packages/builder + + - name: Send report to Coveralls for package @ui5/cli + uses: coverallsapp/github-action@v2.3.6 + continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down) + with: + file: packages/cli/coverage/lcov.info + base-path: packages/cli + + - name: Send report to Coveralls for package @ui5/fs + uses: coverallsapp/github-action@v2.3.6 + continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down) + with: + file: packages/fs/coverage/lcov.info + base-path: packages/fs + + - name: Send report to Coveralls for package @ui5/logger + uses: coverallsapp/github-action@v2.3.6 + continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down) + with: + file: packages/logger/coverage/lcov.info + base-path: packages/logger + + - name: Send report to Coveralls for package @ui5/project + uses: coverallsapp/github-action@v2.3.6 + continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down) + with: + file: packages/project/coverage/lcov.info + base-path: packages/project + + - name: Send report to Coveralls for package @ui5/server + uses: coverallsapp/github-action@v2.3.6 + continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down) + with: + file: packages/server/coverage/lcov.info + base-path: packages/server diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index a33b9517aa0..c36ff0cf13d 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -37,7 +37,7 @@ jobs: run: npm run depcheck - name: Run unit tests - run: npm run coverage + run: npm run unit - name: Generate JSDoc documentation working-directory: packages/documentation diff --git a/README.md b/README.md index 872dee4c0c5..2712022d8c1 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![REUSE status](https://api.reuse.software/badge/github.com/UI5/cli)](https://api.reuse.software/info/github.com/UI5/cli) [![OpenUI5 Community Slack (#tooling channel)](https://img.shields.io/badge/slack-join-44cc11.svg)](https://ui5-slack-invite.cfapps.eu10.hana.ondemand.com) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) +[![Coverage Status](https://coveralls.io/repos/github/UI5/cli/badge.svg)](https://coveralls.io/github/UI5/cli) This repository contains the current **development state** of the upcoming UI5 CLI v5 release. Note that previous versions (up to v4) are maintained in [dedicated repositories](https://github.com/UI5/cli/tree/v4?tab=readme-ov-file#modules).