Skip to content

Feature/edx 1720

Feature/edx 1720 #202

Workflow file for this run

name: API CI
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'feature/**'
- 'Feature/**'
- 'fix/*'
- 'Fix/*'
paths:
- 'api/**'
pull_request:
branches: [ main ]
paths:
- 'api/**'
jobs:
quality_profile:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run unit tests
run: mvn -f pom.xml clean package
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
- name: Run Sonar Analysis
run: mvn -f pom.xml sonar:sonar
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=bcgov-sonarcloud
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}
env:
GITHUB_TOKEN: ${{ github.token }}