From a826cda95aaf613f9e94758f701a173de30c140d Mon Sep 17 00:00:00 2001 From: Sheldan <5037282+Sheldan@users.noreply.github.com> Date: Wed, 27 May 2020 15:55:15 +0200 Subject: [PATCH] Added initial version of github action --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..011d5a545 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +# 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: Execute build and Sonar + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Maven + run: mvn -B package --file pom.xml + - name: Setup sonarqube + uses: warchant/setup-sonar-scanner@v1 + - name: Run sonarqube + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: sonar-scanner + -Dsonar.login=${{ secrets.SONAR_TOKEN }} + -Dsonar.organization=abstracto + -Dsonar.host.url=https://sonarcloud.io/ + -Dsonar.projectKey=abstracto-core