Skip to content

Commit

Permalink
Disables SonarCloud (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
pastuxso authored Sep 23, 2024
1 parent 6b15df5 commit c6314e7
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 28 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: SonarCloud
on:
workflow_dispatch:

# cancel old edit events being processed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install xvfb
run: sudo apt-get update -y && sudo apt-get install xvfb
- name: 👷 Install Dependencies
run: npm ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🧪 Setup and Test with Runme
run: xvfb-run npx runme run configureNPM setup build test:ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUNME_TEST_TOKEN: ${{ secrets.RUNME_TEST_TOKEN }}
RUNME_PROJECT: ${{ github.workspace }}
SHELL: bash
GITHUB_ACTOR: ${{ github.actor }}
- name: 🔼 Upload Artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots
path: |
tests/e2e/screenshots
tests/e2e/logs
- name: 🔼 Upload coverage
uses: actions/upload-artifact@v4
if: ${{github.actor != 'dependabot[bot]' && matrix.os == 'ubuntu-latest'}}
with:
name: coverage
path: ./coverage
if-no-files-found: error

sonarcloud:
if: ${{github.actor != 'dependabot[bot]' && vars.EXTENSION_NAME == 'runme'}}
name: SonarCloud Analysis
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Retrieve saved coverage
uses: actions/[email protected]
with:
name: coverage
path: ./coverage

- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
28 changes: 0 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,8 @@ jobs:
path: |
tests/e2e/screenshots
tests/e2e/logs
- name: 🔼 Upload coverage
uses: actions/upload-artifact@v4
if: ${{github.actor != 'dependabot[bot]' && matrix.os == 'ubuntu-latest'}}
with:
name: coverage
path: ./coverage
if-no-files-found: error
- name: 🐛 Debug Build
uses: stateful/vscode-server-action@v1
if: failure()
with:
timeout: "300000"

sonarcloud:
if: ${{github.actor != 'dependabot[bot]' && vars.EXTENSION_NAME == 'runme'}}
name: SonarCloud Analysis
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Retrieve saved coverage
uses: actions/[email protected]
with:
name: coverage
path: ./coverage

- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit c6314e7

Please sign in to comment.