feat: separate workflow files
Some checks failed
Node.js CI / Lint and Test (pull_request) Successful in 15s
Code Analysis / SonarQube (pull_request) Failing after 20s

This commit is contained in:
Naomi Carrigan 2025-02-26 12:52:56 -08:00
parent 2294275a8b
commit 657f80af5d
Signed by: naomi
SSH Key Fingerprint: SHA256:rca1iUI2OhAM6n4FIUaFcZcicmri0jgocqKiTTAfrt8
3 changed files with 53 additions and 19 deletions

View File

@ -30,22 +30,3 @@ jobs:
- name: Run Tests
run: pnpm run test
- name: Echo
run: |
echo "PR Number: ${{ github.event.pull_request.number }}"
echo "PR Branch: ${{ github.event.pull_request.head.ref }}"
- name: Sonar
uses: SonarSource/sonarqube-scan-action@v4
timeout-minutes: 10
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
with:
args: >
-Dsonar.sources=.
-Dsonar.projectKey=typescript-config
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=main

View File

@ -0,0 +1,24 @@
name: Code Analysis
on:
push:
branches:
- main
jobs:
sonar:
name: SonarQube
steps:
- name: Checkout Source Files
uses: actions/checkout@v4
- name: Sonar
uses: SonarSource/sonarqube-scan-action@v4
timeout-minutes: 10
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
with:
args: >
-Dsonar.sources=.
-Dsonar.projectKey=typescript-config

View File

@ -0,0 +1,29 @@
name: Code Analysis
on:
pull_request:
branches:
- main
jobs:
sonar:
name: SonarQube
steps:
- name: Checkout Source Files
uses: actions/checkout@v4
- name: Sonar
uses: SonarSource/sonarqube-scan-action@v4
timeout-minutes: 10
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
PR_KEY: ${{ github.event.pull_request.number }}
PR_BRANCH: ${{ github.event.pull_request.head.ref }}
with:
args: >
-Dsonar.sources=.
-Dsonar.projectKey=typescript-config
-Dsonar.pullrequest.key=$PR_KEY
-Dsonar.pullrequest.branch=$PR_BRANCH
-Dsonar.pullrequest.base=main