Skip to content

Commit

Permalink
Merge pull request #2467 from opencb/TASK-4970
Browse files Browse the repository at this point in the history
TASK-4970 - New CI/CD should be triggered when a PR is approved for OpenCGA repository
  • Loading branch information
juanfeSanahuja authored Jun 19, 2024
2 parents 9383c2f + a446cf1 commit faf5d28
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 37 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@ jobs:
with:
maven_opts: -Phdp3.1,RClient -Dopencga.war.name=opencga -Dcheckstyle.skip

test:
uses: ./.github/workflows/test-analysis.yml
needs: build
with:
test_profile: runShortTests,runMediumTests
secrets: inherit
## TASK-4970: remove the test job from the develop.yml workflow because it is not needed anymore.
# test:
# uses: ./.github/workflows/test-analysis.yml
# needs: build
# with:
# test_profile: runShortTests,runMediumTests
# secrets: inherit

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

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
needs: test
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images base,init
secrets: inherit
20 changes: 0 additions & 20 deletions .github/workflows/docker-aws-emr.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/long-test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
matrix:
hadoop: [ "hdp3.1", "hdi5.1", "emr6.1", "emr6.13" ]
uses: ./.github/workflows/test-analysis.yml
secrets: inherit
with:
test_profile: runShortTests,runMediumTests,runLongTests
hadoop: ${{ matrix.hadoop }}
secrets: inherit

3 changes: 1 addition & 2 deletions .github/workflows/manual-deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ jobs:
name: build-folder
path: build


deploy-docker:
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 --tag ${{ inputs.tag }}
secrets: inherit
secrets: inherit
2 changes: 0 additions & 2 deletions .github/workflows/manual-deploy-ext-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ jobs:
name: build-folder
path: build


deploy-docker-ext-tools:
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 ${{ inputs.tag }}
secrets: inherit

19 changes: 19 additions & 0 deletions .github/workflows/pull-request-approved.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull request approve workflow

on:
pull_request_review:
types: [submitted]

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -Phdp3.1,RClient -Dopencga.war.name=opencga -Dcheckstyle.skip

test:
name: "Run all tests before merging, ie. short, medium and long tests."
uses: ./.github/workflows/test-analysis.yml
needs: build
with:
test_profile: runShortTests,runMediumTests,runLongTests
secrets: inherit
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
test:
uses: ./.github/workflows/test-analysis.yml
needs: build
secrets: inherit
with:
test_profile: runShortTests
secrets: inherit

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: '10'
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
Expand All @@ -65,7 +65,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: '10'
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
Expand All @@ -91,7 +91,7 @@ jobs:
run: mvn -B clean install -DskipTests -P ${{ inputs.hadoop }} -Dcheckstyle.skip ${{ inputs.mvn_opts }}
- name: Run Junit tests
run: mvn -B verify surefire-report:report --fail-never -f ${{ (inputs.module == '' || inputs.module == 'all') && '.' || inputs.module }} -P ${{ inputs.hadoop }},${{ inputs.test_profile }} -Dcheckstyle.skip ${{ inputs.mvn_opts }}
- name: Publish Test Report
- name: Publish Test Report on GitHub
uses: scacap/action-surefire-report@v1
env:
NODE_OPTIONS: '--max_old_space_size=4096'
Expand Down

0 comments on commit faf5d28

Please sign in to comment.