Skip to content

Commit

Permalink
Merge branch 'develop' into TASK-4810
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfeSanahuja committed Jul 26, 2023
2 parents 0531651 + e65f129 commit f8b73ac
Show file tree
Hide file tree
Showing 46 changed files with 916 additions and 387 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check-junit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ jobs:
uses: ./.github/workflows/test-analysis.yml
with:
test_profile: ${{ needs.get_profiles.outputs.profiles }}
report_context: development
mvn_opts: ${{ inputs.mvn_opts }}
secrets: inherit
18 changes: 5 additions & 13 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,26 @@ on:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.9.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

deploy-docker-ext-tools:
uses: opencb/java-common-libs/.github/workflows/[email protected]
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ needs.build.outputs.version }}
secrets: inherit

test:
uses: ./.github/workflows/test-analysis.yml
needs: deploy-docker-ext-tools
secrets: inherit
needs: build
with:
test_profile: runShortTests,runMediumTests
report_context: development
secrets: inherit

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@release-4.9.x
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: test
with:
maven_opts: -P storage-hadoop,hdp3.1 -Dopencga.war.name=opencga
secrets: inherit

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.9.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,init
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/docker-aws-emr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ on:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.9.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,emr6.1 -Dopencga.war.name=opencga

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.9.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base,init
secrets: inherit
# DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
# DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Docker Tools
name: Deploy Docker Ext-Tools

on:
push:
Expand All @@ -12,13 +12,12 @@ on:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/[email protected]
with:
maven_opts:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop

deploy-docker-ext-tools:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.9.x
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ needs.build.outputs.version }}
secrets: inherit

8 changes: 5 additions & 3 deletions .github/workflows/long-test-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: Long test for run only on weekend

#Every Saturday at 01:10

## Every Saturday at 01:10
on:
schedule:
- cron: '10 1 * * 6'
workflow_dispatch:

jobs:
test:
uses: ./.github/workflows/test-analysis.yml
secrets: inherit
with:
test_profile: runLongTests,runMediumTests,runShortTests
report_context: development
test_profile: runShortTests,runMediumTests,runLongTests,


9 changes: 6 additions & 3 deletions .github/workflows/pull-request-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ name: "Pull Request Merge Workflow"
on:
pull_request:
branches:
- "develop"
- "release-*"
- develop
- release-*
types:
- closed

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop

delete-docker:
uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.9.x
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: inherit
35 changes: 9 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,35 @@ on:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.9.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

deploy-docker-ext-tools:
uses: opencb/java-common-libs/.github/workflows/[email protected]
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ needs.build.outputs.version }}
secrets: inherit

test:
uses: ./.github/workflows/test-analysis.yml
needs: deploy-docker-ext-tools
secrets: inherit
with:
test_profile: runShortTests,runMediumTests
report_context: xetabase

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@release-4.9.x
needs: test
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: build
with:
maven_opts: -P storage-hadoop,hdp3.1 -Dopencga.war.name=opencga
secrets: inherit

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



deploy-python:
uses: opencb/java-common-libs/.github/workflows/deploy-python-workflow.yml@release-4.9.x
needs: test
uses: opencb/java-common-libs/.github/workflows/deploy-python-workflow.yml@develop
needs: build
with:
cli: ./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.9.x
needs: [ build,test ]
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@develop
needs: [ build, deploy-maven, deploy-docker, deploy-python ]
with:
artifact: build-folder
file: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- TASK-*
workflow_dispatch:
#WARNING Develop branch needed for prod

# WARNING Develop branch needed for prod

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.9.x
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

Expand All @@ -18,10 +20,9 @@ jobs:
secrets: inherit
with:
test_profile: runShortTests
report_context: development

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.9.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,init --tag ${{ github.ref_name }}
Expand Down
53 changes: 13 additions & 40 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
name: Build and test the project

on:
workflow_call:
inputs:
test_profile:
type: string
required: true
report_context:
type: string
required: true
mvn_opts:
type: string
required: false
default: ""
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
env:
xb_version: "1.7.2"

jobs:
analysis:
name: Execute Sonar Analysis
Expand Down Expand Up @@ -52,6 +41,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -T 2 clean install -P storage-hadoop,hdp3.1,${{ inputs.test_profile }} -DskipTests -Dcheckstyle.skip org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_opencga

test:
name: Execute JUnit and Jacoco tests
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -81,31 +71,14 @@ jobs:
mongodb-version: 6.0
mongodb-replica-set: rs-test
- name: Run Junit tests
run: mvn -B verify surefire-report:report -P storage-hadoop,hdp3.1,${{ inputs.test_profile }} -Dcheckstyle.skip -Popencga-storage-hadoop-deps -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' ${{ inputs.mvn_opts }}
- 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: ["opencga-app", "opencga-catalog", "opencga-client", "opencga-clinical", "opencga-core", "opencga-master", "opencga-server", "opencga-storage", "opencga-storage/opencga-storage-app", "opencga-storage/opencga-storage-benchmark", "opencga-storage/opencga-storage-core", "opencga-storage/opencga-storage-hadoop", "opencga-storage/opencga-storage-server", "opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core", "opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps"]
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 -P storage-hadoop,hdp3.1,${{ inputs.test_profile }} -Dcheckstyle.skip -Popencga-storage-hadoop-deps -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' ${{ inputs.mvn_opts }}
- 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 }}/${{ github.ref_name }}/opencga/${{ github.sha }}/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
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class HRDetectAnalysis extends OpenCgaToolScopeStudy {
public static final String ID = "hr-detect";
public static final String DESCRIPTION = "Run HRDetect analysis for a given somatic sample.";

public final static String HRDETECT_SCORES_FILENAME_DEFAULT = "data_matrix.tsv";
public final static String HRDETECT_SCORES_FILENAME_DEFAULT = "hrdetect_output.tsv";

@ToolParams
private HRDetectAnalysisParams hrdetectParams = new HRDetectAnalysisParams();
Expand Down
Loading

0 comments on commit f8b73ac

Please sign in to comment.