Skip to content

Commit

Permalink
add build.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanDergachev committed Feb 5, 2024
1 parent 74acb04 commit 525a3bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
name: Build

name: SonarCloud
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 17
- name: Cache SonarQube packages
uses: actions/cache@v1
distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=gehtsoft-usa_deeper-sast-demo_AY14AqsQcXqd9qGs23kB -Dsonar.projectName='deeper-sast-demo'
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=SonarSourceResearch_DeepSAST_Demo
8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

0 comments on commit 525a3bb

Please sign in to comment.