Add scan and test jobs
CI/CD Pipeline / test (push) Failing after 56s
CI/CD Pipeline / scan (push) Has been skipped
CI/CD Pipeline / build-push-deploy (push) Has been skipped

This commit is contained in:
Khalil
2026-07-04 10:39:57 +00:00
parent b5b6baab9c
commit 8020d637d5
+32
View File
@@ -8,8 +8,40 @@ on:
- 'frontend-deployment.yaml'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies and test API
working-directory: ./api
run: npm install && node -c server.js
- name: Install dependencies and test Frontend
working-directory: ./frontend
run: npm install
scan:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
continue-on-error: true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
build-push-deploy:
runs-on: ubuntu-latest
needs: scan
steps:
- name: Checkout Code
uses: actions/checkout@v4