Skip to content

Commit

Permalink
Merge branch 'TASK-4225' of https://github.com/opencb/cellbase into T…
Browse files Browse the repository at this point in the history
…ASK-4225
  • Loading branch information
jtarraga committed Jul 10, 2023
2 parents 7ed0b5d + 37b8526 commit a091dba
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 72 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,17 @@ 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
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: test
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase
secrets: inherit

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.6.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: test
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base
secrets: inherit

6 changes: 2 additions & 4 deletions .github/workflows/pull-request-merge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Merge Workflow"
name: "Pull Request Merge Workflow"

on:
pull_request:
Expand All @@ -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
16 changes: 4 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,28 @@ 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
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: test
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase
secrets: inherit

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.6.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: test
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base
secrets: inherit

deploy-python:
uses: opencb/java-common-libs/.github/workflows/deploy-python-workflow.yml@release-4.6.x
uses: opencb/java-common-libs/.github/workflows/deploy-python-workflow.yml@develop
needs: test
with:
cli: bash ./clients/python/python-build.sh push
artifact: build-folder
secrets: inherit

release:
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@release-4.6.x
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@develop
needs: [deploy-maven, deploy-docker, deploy-python]
7 changes: 1 addition & 6 deletions .github/workflows/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@ 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
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: test
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base --tag ${{ github.ref_name }}
secrets: inherit


55 changes: 11 additions & 44 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit a091dba

Please sign in to comment.