diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index f5bdedf67..6a6391709 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -17,9 +17,6 @@ jobs: uses: ./.github/workflows/test-analysis.yml needs: build secrets: inherit - with: - report_context: development - report_dir: ${{ github.ref_name }}/cellbase/${{ github.sha }} deploy-maven: uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@release-4.6.x @@ -34,4 +31,3 @@ jobs: with: cli: python3 ./build/cloud/docker/docker-build.py push --images base secrets: inherit - diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 2ae158453..4b1c43c68 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -1,4 +1,4 @@ -name: "Merge Workflow" +name: "Pull Request Merge Workflow" on: pull_request: @@ -13,6 +13,4 @@ jobs: uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@develop with: cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} - secrets: - DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} - DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d84b955ed..1ecc875c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,14 +12,6 @@ jobs: with: maven_opts: -DCELLBASE.WAR.NAME=cellbase - test: - uses: ./.github/workflows/test-analysis.yml - needs: build - secrets: inherit - with: - report_context: xetabase - report_dir: cellbase - deploy-maven: uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@release-4.6.x needs: test diff --git a/.github/workflows/task.yml b/.github/workflows/task.yml index 03a61e613..fb3daa0cd 100644 --- a/.github/workflows/task.yml +++ b/.github/workflows/task.yml @@ -16,9 +16,6 @@ jobs: uses: ./.github/workflows/test-analysis.yml needs: build secrets: inherit - with: - report_context: development - report_dir: ${{ github.ref_name }}/cellbase/${{ github.sha }} deploy-docker: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.6.x @@ -26,5 +23,3 @@ jobs: with: cli: python3 ./build/cloud/docker/docker-build.py push --images base --tag ${{ github.ref_name }} secrets: inherit - - diff --git a/.github/workflows/test-analysis.yml b/.github/workflows/test-analysis.yml index 869398f86..d2bc8a55c 100644 --- a/.github/workflows/test-analysis.yml +++ b/.github/workflows/test-analysis.yml @@ -4,23 +4,7 @@ on: secrets: SONAR_TOKEN: required: true - SSH_TESTING_SERVER_HOST: - required: true - SSH_TESTING_SERVER_PORT: - required: true - SSH_TESTING_SERVER_USER: - required: true - SSH_TESTING_SERVER_PASSWORD: - required: true - inputs: - report_dir: - type: string - required: true - report_context: - type: string - required: true -env: - xb_version: "1.7.0" + jobs: test: name: Test and push Sonar analysis @@ -52,31 +36,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify surefire-report:report -Dcheckstyle.skip org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_cellbase - - name: Upload result dir - uses: actions/upload-artifact@v3 - with: - name: workdir - path: "**/target/site" - publish-test: - name: Publish test results - runs-on: ubuntu-22.04 - needs: test - strategy: - matrix: - module: ["cellbase-core", "cellbase-app", "cellbase-client", "cellbase-lib", "cellbase-server"] - steps: - - name: Download result dir - uses: actions/download-artifact@v3 - with: - name: workdir - - name: Deploy unit tests web recursively to remote - uses: garygrossgarten/github-action-scp@release + run: mvn -B verify surefire-report:report --fail-never -Dcheckstyle.skip org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_cellbase + - name: Publish Test Report + uses: scacap/action-surefire-report@v1 + ## Skip cancelled() + ## https://docs.github.com/en/actions/learn-github-actions/expressions#cancelled + if: success() || failure() with: - local: ${{ matrix.module }}/target/site - remote: /var/www/html/reports/${{ inputs.report_context }}/${{ env.xb_version }}/${{ inputs.report_dir }}/unit/${{ matrix.module }} - host: ${{ secrets.SSH_TESTING_SERVER_HOST}} - port: ${{ secrets.SSH_TESTING_SERVER_PORT}} - username: ${{ secrets.SSH_TESTING_SERVER_USER }} - password: ${{ secrets.SSH_TESTING_SERVER_PASSWORD }} - concurrency: 2 + check_name: "Surefire tests report" + report_paths: './**/surefire-reports/TEST-*.xml' + commit: '${{ github.sha }}' + fail_on_test_failures: true