Skip to content

009 - Refactor devsecops model #43

009 - Refactor devsecops model

009 - Refactor devsecops model #43

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: 'CI'
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
pull_request:
jobs:
continuous-testing:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '17'
cache: 'maven'
- name: Compile
run: mvn clean compile
- name: Unit Test
run: mvn test
- name: Integration API Test
run: mvn verify -Pintegration-test
- name: Upload test results
uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: |
target/surefire-reports/TEST*.xml
target/failsafe-reports/TEST*.xml
- name: Analyze with SonarCloud
run: mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dsonar.organization=sonarqubegeekshubs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}