Skip to content

EAS Administration permissions. EAC-11 #975

EAS Administration permissions. EAC-11

EAS Administration permissions. EAC-11 #975

name: API CI
on:
push:
branches:
- master
- 'feature/**'
- 'Feature/**'
- 'fix/*'
- 'Fix/*'
paths:
- 'api/**'
pull_request:
branches: [ master ]
paths:
- 'api/**'
jobs:
quality_profile:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 18
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-5Jun-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-5Jun-
- name: Run unit tests
run: mvn -f pom.xml clean package
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
- name: Run Sonar Analysis
run: mvn sonar:sonar
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=bcgov-sonarcloud
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}
env:
GITHUB_TOKEN: ${{ github.token }}