Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFD-5448 Contract tests in postcode API not running #192

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 32 additions & 20 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: "Check code format and quality"
on:
name: Check code format and quality
'on':
push:
branches: [master]
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
types:
- opened
- synchronize
- reopened
jobs:
check-code-quality:
runs-on: ubuntu-latest
Expand All @@ -20,20 +24,28 @@ jobs:
- name: Check Terraform files format
run: |
build/automation/etc/githooks/scripts/terraform-format-pre-commit.sh
- name: Create coverage report
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and Analyze with SonarQube
run: |
make compile coverage-report
# - uses: sonarsource/sonarcloud-github-action@master
# SEE: https://github.com/SonarSource/sonarcloud-github-action
#env:
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
#with:
#projectBaseDir: ./application
#args: >
#-Dsonar.organization=nhsd-exeter
#-Dsonar.projectKey=uec-dos-api-pca
#-Dsonar.java.binaries=target/classes
#-Dsonar.coverage.exclusions=src/main/java/**/config/*.*,src/main/java/**/domain/*.*,src/main/java/**/exception/*.*,src/test/**/*.*,src/main/java/**/filter/*.*,src/main/java/**/PostcodeMappingApplication.*
#-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco
#-Dsonar.verbose=true
ls -la ${{ github.workspace }}
cd application
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=nhsd-exeter \
-Dsonar.projectKey=uec-dos-api-pca \
-Dsonar.java.binaries=target/classes \
-Dsonar.coverage.exclusions=src/main/java/**/config/*.*,src/main/java/**/domain/*.*,src/main/java/**/exception/*.*,src/test/**/*.*,src/main/java/**/filter/*.*,src/main/java/**/PostcodeMappingApplication.* \
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco \
-Dsonar.verbose=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
10 changes: 9 additions & 1 deletion application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,15 @@
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down Expand Up @@ -284,6 +291,7 @@
</goals>
<configuration>
<rules>

<rule>
<element>PACKAGE</element>
<excludes>
Expand Down
Loading