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/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ on:
workflow_dispatch:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -DCELLBASE.WAR.NAME=cellbase -P default-config-test

test:
uses: ./.github/workflows/test-analysis.yml
needs: build
secrets: inherit
with:
upload_artifact: true

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: test
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase
cache_key: ${{ needs.test.outputs.cache_key }}
secrets: inherit

deploy-docker:
Expand Down
32 changes: 23 additions & 9 deletions .github/workflows/manual-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,26 @@ on:
description: 'The process executes all tests even if some fail.'
default: false
required: false
upload_artifact:
type: boolean
description: 'Upload build artifact.'
default: false
required: false

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
needs_hadoop_preparation: false
maven_opts: -Dcheckstyle.skip
upload_artifact: ${{ inputs.upload_artifact }}
dependency_repos: "java-common-libs,biodata"
secrets: inherit

test:
name: JUnit Test
runs-on: ubuntu-22.04
needs: build
runs-on: ${{ vars.UBUNTU_VERSION }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -34,14 +49,13 @@ jobs:
chmod +x ./kubectl
echo "${{ secrets.AZURE_KUBE_CONFIG }}" > admin.conf
./kubectl -n cellbase-db port-forward services/cellbase-rs0-svc 27017:27017 --kubeconfig ./admin.conf &
- name: Install dependencies branches
run: |
if [ -f "./.github/workflows/scripts/get_same_branch.sh" ]; then
chmod +x ./.github/workflows/scripts/get_same_branch.sh
./.github/workflows/scripts/get_same_branch.sh ${{ github.ref_name }}
else
echo "./.github/workflows/scripts/get_same_branch.sh does not exist."
fi
- name: Cache local Maven repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build.outputs.cache_key }}
## Force cache hit to avoid testing with incomplete dependencies
fail-on-cache-miss: true
- name: Test and Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pull-request-approved.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ on:
jobs:
test:
uses: ./.github/workflows/test-analysis.yml
secrets: inherit
secrets: inherit
with:
upload_artifact: false
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ jobs:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -DCELLBASE.WAR.NAME=cellbase
dependency_repos: "java-common-libs,biodata"
upload_artifact: true

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
needs: build
with:
maven_opts: -Dcheckstyle.skip -DCELLBASE.WAR.NAME=cellbase
cache_key: ${{ needs.build.outputs.cache_key }}
secrets: inherit

deploy-docker:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/scripts/get_same_branch.sh

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ on:
workflow_dispatch:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -DCELLBASE.WAR.NAME=cellbase -P default-config-test

test:
uses: ./.github/workflows/test-analysis.yml
needs: build
secrets: inherit
with:
upload_artifact: true

deploy-docker:
uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop
Expand Down
37 changes: 28 additions & 9 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,34 @@ name: Build and test the project

on:
workflow_call:
inputs:
upload_artifact:
type: boolean
required: false
default: false
outputs:
cache_key:
description: "Cache key used for Maven repository"
value: ${{ jobs.build.outputs.cache_key }}
secrets:
SONAR_TOKEN:
required: true

jobs:

build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
needs_hadoop_preparation: false
maven_opts: -Dcheckstyle.skip
upload_artifact: ${{ inputs.upload_artifact }}
dependency_repos: "java-common-libs,biodata"
secrets: inherit

test:
name: Test and push Sonar analysis
runs-on: ubuntu-22.04
needs: build
runs-on: ${{ vars.UBUNTU_VERSION }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -26,14 +46,13 @@ jobs:
chmod +x ./kubectl
echo "${{ secrets.AZURE_KUBE_CONFIG }}" > admin.conf
./kubectl -n cellbase-db port-forward services/cellbase-rs0-svc 27017:27017 --kubeconfig ./admin.conf &
- name: Install dependencies branches
run: |
if [ -f "./.github/workflows/scripts/get_same_branch.sh" ]; then
chmod +x ./.github/workflows/scripts/get_same_branch.sh
./.github/workflows/scripts/get_same_branch.sh ${{ github.ref_name }}
else
echo "./.github/workflows/scripts/get_same_branch.sh does not exist."
fi
- name: Cache local Maven repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build.outputs.cache_key }}
## Force cache hit to avoid testing with incomplete dependencies
fail-on-cache-miss: true
- name: Test and Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,8 @@ private List<PopulationFrequency> getPopulationFrequency(List<PopulationFrequenc
&& populationFrequency.getPopulation().equals(populationFrequency1.getPopulation())
&& populationFrequency.getRefAllele().equals(populationFrequency1.getRefAllele())
&& populationFrequency.getAltAllele().equals(populationFrequency1.getAltAllele())
&& populationFrequency.getAltAlleleFreq().equals(populationFrequency1.getAltAlleleFreq())
&& populationFrequency.getRefAlleleFreq().equals(populationFrequency1.getRefAlleleFreq())) {
&& populationFrequency.getAltAlleleFreq() == populationFrequency1.getAltAlleleFreq()
&& populationFrequency.getRefAlleleFreq() == populationFrequency1.getRefAlleleFreq()) {
populationFrequencyList1.add(populationFrequency);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ private List<PopulationFrequency> getPopulationFrequency(List<PopulationFrequenc
&& populationFrequency.getPopulation().equals(populationFrequency1.getPopulation())
&& populationFrequency.getRefAllele().equals(populationFrequency1.getRefAllele())
&& populationFrequency.getAltAllele().equals(populationFrequency1.getAltAllele())
&& populationFrequency.getAltAlleleFreq().equals(populationFrequency1.getAltAlleleFreq())
&& populationFrequency.getRefAlleleFreq().equals(populationFrequency1.getRefAlleleFreq())) {
&& populationFrequency.getAltAlleleFreq() == populationFrequency1.getAltAlleleFreq()
&& populationFrequency.getRefAlleleFreq() == populationFrequency1.getRefAlleleFreq()) {
populationFrequencyList1.add(populationFrequency);
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<commons-codec.version>1.13</commons-codec.version>
<jakarta.xml.bind-api.version>2.3.3</jakarta.xml.bind-api.version>
<guava.version>19.0</guava.version>
<avro.version>1.9.1</avro.version>
<avro.version>1.11.4</avro.version>
<hamcrest.version>1.3</hamcrest.version>
<htsjdk.version>2.23.0</htsjdk.version>
<grpc.version>1.48.0</grpc.version>
Expand Down