Update badges #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up 64-bit Corretto 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: x64 | |
cache: maven | |
- name: Run unit tests | |
run: SPRING_PROFILES_ACTIVE=test mvn -B -ntp -Dgroups=unit test | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
component: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up 64-bit Corretto 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: x64 | |
cache: maven | |
- name: Run component tests | |
run: SPRING_PROFILES_ACTIVE=test mvn -B -ntp -Dgroups=component test | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BLINKPAY_CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
BLINKPAY_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
integration: | |
if: ${{ vars.JOB_ENABLED == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up 64-bit Corretto 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: x64 | |
cache: maven | |
- name: Run integration tests | |
run: mvn -B -ntp -Dgroups=integration test | |
env: | |
BLINKPAY_CLIENT_ID: ${{ vars.CLIENT_ID }} | |
BLINKPAY_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
BLINKPAY_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
snyk: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up 64-bit Corretto 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: x64 | |
cache: maven | |
- name: Run Snyk to check for vulnerabilities | |
run: | | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" && \. $NVM_DIR/nvm.sh | |
nvm install 16 | |
npm install -g snyk | |
snyk auth ${{ secrets.SNYK_TOKEN }} | |
snyk monitor --org=blinkpay-zw9 --maven-aggregate-project | |
continue-on-error: true | |
sonar: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up 64-bit Corretto 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
architecture: x64 | |
cache: maven | |
- name: Run Sonar on blink-debit-api-client-java to inspect code | |
run: > | |
SPRING_PROFILES_ACTIVE=test | |
mvn -B -ntp -pl .,core,java verify sonar:sonar | |
-DskipTests | |
-Dgpg.skip | |
-Dsonar.projectKey=blink-debit-api-client-java | |
-Dsonar.organization=blinkpay | |
-Dsonar.host.url=https://sonarcloud.io | |
-Dsonar.junit.reportPaths=target/surefire-reports | |
-Dsonar.coverage.plugin=jacoco | |
-Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/jacoco-ut/jacoco.xml | |
-Dsonar.projectName=blink-debit-api-client-java | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Run Sonar on blink-debit-api-client-java-spring6 to inspect code | |
run: > | |
SPRING_PROFILES_ACTIVE=test | |
mvn -B -ntp -pl .,core,java-spring6 verify sonar:sonar | |
-DskipTests | |
-Dgpg.skip | |
-Dsonar.projectKey=blink-debit-api-client-java-spring6 | |
-Dsonar.organization=blinkpay | |
-Dsonar.host.url=https://sonarcloud.io | |
-Dsonar.junit.reportPaths=target/surefire-reports | |
-Dsonar.coverage.plugin=jacoco | |
-Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/jacoco-ut/jacoco.xml | |
-Dsonar.projectName=blink-debit-api-client-java-spring6 | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SPRING6_SONAR_TOKEN }} |