Skip to content

Merge issue miw-upm/betca-tpv#519 into develop #45

Merge issue miw-upm/betca-tpv#519 into develop

Merge issue miw-upm/betca-tpv#519 into develop #45

Workflow file for this run

name: Spring User - Tests
on:
push:
branches: ['develop', 'release-*']
jobs:
test:
name: Test - Unit & Integration & SonarCloud Scan & Slack WebHook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with: {fetch-depth: 0}
- uses: actions/setup-java@v1
with:
java-version: 17
- name: Unit & Integration Tests
run: mvn -B verify
env:
JWT_SECRET: ${{ secrets.JWT_SECRET }}
- name: Slack WebHook
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,author,commit,author,workflow, # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
- name: Sonar
if: success() # always() failure() success()
run: >
mvn -B verify -DskipTests sonar:sonar
-Dsonar.projectKey=es.upm.miw:betca-tpv-user
-Dsonar.organization=miw-upm-github
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}