-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (50 loc) · 1.79 KB
/
commonslang.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build and Test
on:
push:
branches:
- github_action_java
pull_request:
branches:
- github_action_java
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository code
- name: Checkout Code
uses: actions/checkout@v3
# Step 2: Set up Java environment
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin' # Use Eclipse Temurin JDK
java-version: '17' # Update this version as per project requirements
# Step 3: Cache Maven dependencies
- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# Step 4: Run Maven build
- name: Build with Maven
run: |
cd sample_source_code/JAVA/commons-lang
mvn clean install --batch-mode
# Step 5: Download and un-tar the BrowserStack CQ Scanner
- name: Download and Unpack BrowserStack CQ Scanner
run: |
curl https://v1.embold.io/nfs/CLI/browserstack-codequality-scanner.tar.gz -o browserstack-codequality-scanner-archive.tar.gz
tar xvf browserstack-codequality-scanner-archive.tar.gz
# Step 7: Run the BrowserStack CQ Scanner
- name: Run Static Code Analysis
env:
EMBOLD_TOKEN: ${{ secrets.EMBOLD_TOKEN_IDE_INST }}
run: |
./browserstack-codequality-scanner/bin/embold-scanner analyse \
-u https://demo.embold.io \
-t $EMBOLD_TOKEN \
-r e602c21b7e4d91f90b2914504eaeb8ae \
-c sample_source_code/JAVA/commons-lang/repository-configuration.json