diff --git a/.github/workflows/pr-reporting.yml b/.github/workflows/pr-reporting.yml index 9c6693a5d6..faac0ede81 100644 --- a/.github/workflows/pr-reporting.yml +++ b/.github/workflows/pr-reporting.yml @@ -45,26 +45,3 @@ jobs: recreate: true path: code-coverage-results.md number: ${{ github.event.workflow_run.pull_requests[0].number }} - - # Configuration to run a SonarCloud analysis on main branch - sonarcloud: - name: SonarCloud Analysis - runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ github.token }} - needs: pr_report - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Download coverage artifacts with cli - run: | - gh run download ${{ github.event.workflow_run.id }} -n coverage - - - 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 }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 21d531ca69..a0562351f0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,8 +6,10 @@ name: Build pr on: + push: + branches: [main, chore/**] pull_request: - branches: [main, release/**, next/**] + branches: [main, release/**, next/**, chore/**] permissions: pull-requests: write @@ -94,13 +96,14 @@ jobs: needs: build steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Download coverage artifacts with cli - run: | - gh run download ${{ github.event.workflow_run.id }} -n coverage + - uses: actions/download-artifact@v2 + with: + name: coverage + path: coverage/lcov.info - name: Run sonar cloud analysis uses: SonarSource/sonarcloud-github-action@master diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d5487f9b70..6ee30e6401 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -30,49 +30,13 @@ jobs: npm install -g yarn lerna yarn - - name: Install Playwright Browsers - run: npx playwright install --with-deps chromium - - name: Set Preview Version run: node scripts/setVersion.js --next - name: Build 🛠 run: yarn build - - run: yarn test - - name: Fix code coverage paths - run: | - sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage/lcov-report/index.html - - name: Archive coverage/lcov-report/index.html - 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-report/index.html - name: Publish preview packages 🚀 run: lerna exec --scope @microsoft/* -- "npm publish --tag next --access=public" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - # Configuration to run a SonarCloud analysis on main branch - sonarcloud: - name: SonarCloud Analysis - runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ github.token }} - needs: build - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Download coverage artifacts with cli - run: | - gh run download ${{ github.event.workflow_run.id }} -n coverage - - - 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 }}