-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60c1ccd
commit 6ff4b75
Showing
1 changed file
with
38 additions
and
21 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 |
---|---|---|
|
@@ -49,36 +49,53 @@ jobs: | |
CLIENT_SECRET: ${{secrets.client_secret}} | ||
USER_ID: ${{secrets.user_id}} | ||
- run: npm run test | ||
|
||
code-coverage: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
coverage: | ||
- name: "Abstractions" | ||
path: "./packages/abstractions/coverage" | ||
- name: "Authentication Azure" | ||
path: "./packages/authentication/azure/coverage" | ||
- name: "Authentication Spfx" | ||
path: "./packages/authentication/spfx/coverage" | ||
- name: "Http Fetch" | ||
path: "./packages/http/fetch/coverage" | ||
- name: "Serialization Form" | ||
path: "./packages/serialization/form/coverage" | ||
- name: "Serialization JSON" | ||
path: "./packages/serialization/json/coverage" | ||
- name: "Serialization Text" | ||
path: "./packages/serialization/text/coverage" | ||
- name: "Serialization Multipart" | ||
path: "./packages/serialization/multipart/coverage" | ||
- name: "Bundle" | ||
path: "./packages/bundle/coverage" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js 22.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run test:coverage | ||
if: ${{ matrix.node-version == '22.x' }} | ||
- name: Code Coverage Report | ||
if: ${{ matrix.node-version == '22.x' }} | ||
- name: Code Coverage Report ${{ matrix.coverage.name }} | ||
uses: irongut/[email protected] | ||
with: | ||
filename: "packages/**/coverage/cobertura-coverage.xml" | ||
filename: ${{ matrix.coverage.path }}/cobertura-coverage.xml | ||
format: markdown | ||
hide_branch_rate: false | ||
output: both | ||
badge: true | ||
- name: Add Coverage PR Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: ${{ github.event_name == 'pull_request' && matrix.node-version == '22.x' }} | ||
with: | ||
recreate: true | ||
path: code-coverage-results.md | ||
- name: Archive coverage files | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Coverage files ${{ matrix.node-version }} | ||
path: | | ||
packages/abstractions/coverage | ||
packages/serialization/form/coverage | ||
packages/serialization/json/coverage | ||
packages/serialization/multipart/coverage | ||
packages/serialization/text/coverage | ||
packages/http/fetch/coverage | ||
packages/authentication/azure/coverage | ||
packages/authentication/spfx/coverage | ||
name: Coverage files for ${{ matrix.coverage.name }} | ||
path: ${{ matrix.coverage.path }} | ||
|
||
|
||
publish-npm: | ||
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'chore: release main') }}" | ||
|
@@ -108,7 +125,7 @@ jobs: | |
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks. | ||
check-typescript-version-matrix: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
needs: [build,code-coverage] | ||
if: always() | ||
steps: | ||
- name: All build matrix options are successful | ||
|