forked from hkhcoder/vprofile-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WorkflowTestCode.rtf
63 lines (62 loc) · 2.19 KB
/
WorkflowTestCode.rtf
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{\rtf1\ansi\ansicpg1252\cocoartf2758
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\f0\fs24 \cf0 name: vprofile actions\
on: workflow_dispatch\
env:\
AWS_REGION: us-east-2\
ECR_REPOSITORY: vprofileapp\
EKS_CLUSTER: vprofile-eks\
\
jobs:\
Testing:\
runs-on: ubuntu-latest\
steps:\
- name: Code checkout\
uses: actions/checkout@v4\
\
- name: Maven test\
run: mvn test\
\
- name: Checkstyle\
run: mvn checkstyle:checkstyle\
\
# Setup java 11 to be default (sonar-scanner requirement as of 5.x)\
- name: Set Java 11\
uses: actions/setup-java@v3\
with:\
distribution: 'temurin' # See 'Supported distributions' for available options\
java-version: '11'\
\
# Setup sonar-scanner\
- name: Setup SonarQube\
uses: warchant/setup-sonar-scanner@v7\
\
\
# Run sonar-scanner\
- name: SonarQube Scan\
run: sonar-scanner\
-Dsonar.host.url=$\{\{ secrets.SONAR_URL \}\}\
-Dsonar.login=$\{\{ secrets.SONAR_TOKEN \}\}\
-Dsonar.organization=$\{\{ secrets.SONAR_ORGANIZATION \}\}\
-Dsonar.projectKey=$\{\{ secrets.SONAR_PROJECT_KEY \}\}\
-Dsonar.sources=src/\
-Dsonar.junit.reportsPath=target/surefire-reports/ \
-Dsonar.jacoco.reportsPath=target/jacoco.exec \
-Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml\
-Dsonar.java.binaries=target/test-classes/com/visualpathit/account/controllerTest/ \
\
# Check the Quality Gate status.\
- name: SonarQube Quality Gate check\
id: sonarqube-quality-gate-check\
uses: sonarsource/sonarqube-quality-gate-action@master\
# Force to fail step after specific time.\
timeout-minutes: 5\
env:\
SONAR_TOKEN: $\{\{ secrets.SONAR_TOKEN \}\}\
SONAR_HOST_URL: $\{\{ secrets.SONAR_URL \}\} #OPTIONAL\
\
}