-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (42 loc) · 1.11 KB
/
gradle-analyse.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Static Code Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ develop ]
jobs:
backend:
environment: Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: SonarQube Scan Backend
run: ./gradlew test sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
frontend:
environment: Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node 19
uses: actions/setup-node@v3
with:
node-version: '19'
- name: SonarQube Frontend
run: cd ./frontend && npm install && npm test && npm run sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}