-
Notifications
You must be signed in to change notification settings - Fork 304
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
Showing
3 changed files
with
67 additions
and
35 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 |
---|---|---|
|
@@ -31,8 +31,6 @@ jobs: | |
- name: Download coverage artifacts with cli | ||
run: | | ||
gh run download ${{ github.event.workflow_run.id }} -n coverage | ||
- name: Display structure of downloaded files | ||
run: ls -R | ||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
with: | ||
|
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,8 +6,6 @@ | |
name: Build pr | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main, release/**, next/**] | ||
|
||
|
@@ -17,8 +15,6 @@ permissions: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
strategy: | ||
matrix: | ||
|
@@ -51,12 +47,6 @@ jobs: | |
with: | ||
name: coverage | ||
path: coverage/cobertura-coverage.xml | ||
- name: Archive coverage lcov.info | ||
uses: actions/upload-artifact@v2 # upload coverage lcov.info | ||
if: always() # run this step even if previous step failed | ||
with: | ||
name: coverage | ||
path: coverage/lcov.info | ||
|
||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
|
@@ -82,26 +72,3 @@ jobs: | |
- name: One or more build matrix options failed | ||
if: ${{ contains(needs.*.result, 'failure') }} | ||
run: exit 1 | ||
|
||
# Configuration to run a SonarCloud analysis on main, release and next branches | ||
sonarcloud: | ||
name: SonarCloud Analysis | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
needs: build | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/download-artifact@v4 | ||
- name: Display structure of downloaded files | ||
run: ls -R | ||
|
||
- name: Run sonar cloud analysis | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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,67 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
# Tests are executed and coverage reports are emitted as to the action summary | ||
# A dependent workflow which uses workflow_run as a trigger reads the archived outputs and emits comments to the PR triggering this build | ||
|
||
name: Sonar Cloud | ||
|
||
on: | ||
push: | ||
branches: [main, chore/**, release/**, next/**] | ||
paths: | ||
- 'packages/**' | ||
pull_request: | ||
branches: [main, release/**, next/**, chore/**] | ||
paths: | ||
- 'packages/**' | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
sonarcloud: | ||
name: SonarCloud Analysis | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install -g lerna | ||
- name: Install node_modules | ||
run: yarn | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps chromium | ||
- run: node scripts/setVersion.js --next | ||
- run: yarn build | ||
- run: yarn lint | ||
- run: yarn test | ||
- name: Archive coverage lcov.info | ||
uses: actions/upload-artifact@v2 # upload coverage lcov.info | ||
if: always() # run this step even if previous step failed | ||
with: | ||
name: coverage | ||
path: coverage/lcov.info | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage | ||
path: coverage/lcov.info | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
|
||
- name: Run sonar cloud analysis | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |