005 - feat: Publish API methods #94
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: 'CI' | |
# Controls when the action will run. | |
on: | |
workflow_call: | |
workflow_dispatch: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
continuous-testing: | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# Runs a single command using the runners shell | |
- name: Set up JDK 1.17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "liberica" | |
java-version: "17" | |
cache: "maven" | |
- name: Compile | |
run: mvn clean compile | |
- name: Unit Test | |
run: mvn test | |
- name: Integration API Test | |
run: mvn verify -Pintegration-test | |
- uses: dorny/test-reporter@v1 | |
with: | |
name: Test Results | |
path: "target/**/TEST*.xml" | |
reporter: java-junit | |
- name: Analyze with SonarCloud | |
run: mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dsonar.organization=sonarqubegeekshubs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |