Skip to content
Merged
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
9 changes: 3 additions & 6 deletions .github/workflows/build-java-app-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
build-workflow:
name: Build Java app
runs-on: ubuntu-22.04
#runs-on: self-hosted
outputs:
version: ${{ steps.get_project_version.outputs.version }}
steps:
Expand All @@ -41,10 +40,8 @@ jobs:
name: build-folder
path: build
- id: get_project_version
uses: avides/actions-project-version-check@v1.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
file-to-check: pom.xml
only-return-version: true
name: Get project version
run: |
echo "version=`mvn help:evaluate -q -Dexpression=project.version -DforceStdout`" >> $GITHUB_OUTPUT
- name: test-version-from-check
run: echo "Project version is " ${{ steps.get_project_version.outputs.version }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy-python-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
env:
TWINE_USERNAME: ${{ secrets.PYPI_TWINE_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_TWINE_PASSWORD }}
run: ${{ inputs.cli }}
run: ${{ inputs.cli }}
41 changes: 0 additions & 41 deletions .github/workflows/deprecated/sonar-analysis-workflow.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push java-common-libs develop
name: Merge/Push in java-common-libs develop branch

on:
push:
Expand All @@ -14,9 +14,6 @@ jobs:
uses: ./.github/workflows/test-analysis.yml
needs: build
secrets: inherit
with:
report_context: development
report_dir: ${{ github.ref_name }}/java-common-libs/${{ github.sha }}

deploy-maven:
uses: ./.github/workflows/deploy-maven-repository-workflow.yml
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ jobs:
build:
uses: ./.github/workflows/build-java-app-workflow.yml

test:
uses: ./.github/workflows/test-analysis.yml
needs: build
secrets: inherit
with:
report_context: xetabase
report_dir: java-common-libs

deploy-maven:
uses: ./.github/workflows/deploy-maven-repository-workflow.yml
needs: test
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/scripts/get_same_branch.sh

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/task.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push java-common-libs task
name: Push in java-common-libs task branch

on:
push:
Expand All @@ -13,6 +13,3 @@ jobs:
uses: ./.github/workflows/test-analysis.yml
needs: build
secrets: inherit
with:
report_context: development
report_dir: ${{ github.ref_name }}/java-common-libs/${{ github.sha }}
56 changes: 12 additions & 44 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
name: Build and test the project

on:
workflow_call:
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.8.0"

jobs:
test:
name: Test and push Sonar analysis
Expand All @@ -44,31 +29,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 org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_java-common-libs
- 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: ["commons-lib", "commons-datastore", "commons-datastore/commons-datastore-core", "commons-datastore/commons-datastore-mongodb", "commons-datastore/commons-datastore-solr"]
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 org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_java-common-libs
- 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