Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK-2270 #239

Merged
merged 59 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
fe5bb18
cicd: add jacoco and activate testing in task workflow
imedina Jan 12, 2023
4a3ee17
cicd: add jacoco and activate testing in release and develop workflows
imedina Jan 12, 2023
38fc087
cicd: genereate JUnit reports in HTML
imedina Jan 12, 2023
9b35bb3
cicd: copy biodata-tools tests
imedina Jan 12, 2023
6059112
cicd: use secfrets variable
imedina Jan 12, 2023
7eb0deb
workflows: Added report publisher #TASK-2270
juanfeSanahuja Jan 16, 2023
95cd15f
workflows: Added biodata directory #TASK-2270
juanfeSanahuja Jan 16, 2023
660674b
workflows: Added version directory #TASK-2270
juanfeSanahuja Jan 16, 2023
ab8d6e5
workflows: Added version directory #TASK-2270
juanfeSanahuja Jan 16, 2023
88224b0
workflows: Added version directory #TASK-2270
juanfeSanahuja Jan 16, 2023
b50e9ee
workflows: Added version directory #TASK-2270
juanfeSanahuja Jan 16, 2023
76c13f0
workflows: Added version directory #TASK-2270
juanfeSanahuja Jan 17, 2023
244043d
cicd: minor improvement
imedina Jan 17, 2023
5226c3a
workflows: Fix models in matrix #TASK-2270
juanfeSanahuja Jan 18, 2023
ca8a662
workflows: separe unit and coverage directories #TASK-2270
juanfeSanahuja Jan 18, 2023
e9e5fd5
workflows: separe unit and coverage directories #TASK-2270
juanfeSanahuja Jan 18, 2023
53b6b76
workflows: xb_version variable created #TASK-2270
juanfeSanahuja Jan 18, 2023
6d6b8a7
workflows: xb_version variable created #TASK-2270
juanfeSanahuja Jan 18, 2023
f817aea
workflows: Environment variable for xetabase version #TASK-2270
juanfeSanahuja Jan 19, 2023
723b389
workflows:delete unnecessary comments #TASK-2270
juanfeSanahuja Jan 19, 2023
ebbee49
cicd: add two unit paths
imedina Jan 20, 2023
a920a1f
cicd: add two junit paths
imedina Jan 20, 2023
3825c52
cicd: add four unit paths
imedina Jan 20, 2023
8367f9d
cicd: use matrix to copy files
imedina Jan 20, 2023
72d16b0
cicd: merge unit y jacoco
imedina Jan 20, 2023
7d1d9d0
workflows: Share test results whith publish job #TASK-2270
juanfeSanahuja Feb 7, 2023
1d253fd
cicd: review and minor fixes
imedina Feb 7, 2023
be0fb35
cicd: select paths to upload
imedina Feb 7, 2023
4f615a4
cicd: select right paths to upload
imedina Feb 7, 2023
e61af0d
cicd: select right paths to upload
imedina Feb 7, 2023
b89262d
cicd: version updates, fixes and improvements
imedina Feb 8, 2023
dcdd4bd
cicd: fix report test server path
imedina Feb 8, 2023
1936321
workflows: Refactor test.yml #TASK-2270
juanfeSanahuja Feb 8, 2023
4693448
workflows: Refactor test.yml #TASK-2270
juanfeSanahuja Feb 8, 2023
95caa2f
workflows: Refactor test.yml #TASK-2270
juanfeSanahuja Feb 8, 2023
9f2bd58
workflows: check without sonar #TASK-2270
juanfeSanahuja Feb 8, 2023
e7f084b
workflows: check without sonar #TASK-2270
juanfeSanahuja Feb 8, 2023
3f24d4c
workflows: undo refactor to check problems #TASK-2270
juanfeSanahuja Feb 8, 2023
dc46a48
cicd: fix build-test.yml
imedina Feb 8, 2023
58630b0
cicd: fix build-test.yml
imedina Feb 8, 2023
cd50e75
cicd: path pattern #TASK-2270
juanfeSanahuja Feb 8, 2023
2afd9bc
cicd: refactor #TASK-2270
juanfeSanahuja Feb 8, 2023
2163857
cicd: refactor #TASK-2270
juanfeSanahuja Feb 8, 2023
665db1f
cicd: refactor #TASK-2270
juanfeSanahuja Feb 8, 2023
0bfd2be
cicd: refactor test #TASK-2270
juanfeSanahuja Feb 8, 2023
cf8c825
cicd: refactor test #TASK-2270
juanfeSanahuja Feb 8, 2023
bb73b79
cicd: add build test #TASK-2270
juanfeSanahuja Feb 8, 2023
94ee357
cicd: Fix mandatory secrets #TASK-2270
juanfeSanahuja Feb 8, 2023
47dd705
cicd: Fix mandatory secrets #TASK-2270
juanfeSanahuja Feb 8, 2023
1b01882
cicd: Refactor build test yml #TASK-2270
juanfeSanahuja Feb 8, 2023
73731cb
cicd: Delete taget from path #TASK-2270
juanfeSanahuja Feb 8, 2023
469f87b
cicd: Delete taget from path #TASK-2270
juanfeSanahuja Feb 8, 2023
3db1981
cicd: minor improvements
imedina Feb 9, 2023
6f55fb6
cicd: added merge workflow #TASK-2270
juanfeSanahuja Feb 9, 2023
6bddcba
wc: minor style improvements
imedina Feb 9, 2023
3999d63
cicd: Clean . dir from report matrix #TASK-2270
juanfeSanahuja Feb 9, 2023
6f4f7f8
Merge branch 'TASK-2270' of https://github.com/opencb/biodata into TA…
juanfeSanahuja Feb 9, 2023
dc64a0f
cicd: Replace TASK-2270 references #TASK-2270
juanfeSanahuja Feb 9, 2023
421152a
cicd: Merge develop #TASK-2270
juanfeSanahuja Feb 9, 2023
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
72 changes: 72 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
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

env:
xb_version: "1.5.0"

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

test:
name: Test and push Sonar analysis
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Install Samtools
run: sudo apt-get install samtools
- name: Test and Analyze
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_biodata
- 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: [ "biodata-tools","biodata-models" ]
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
with:
local: ${{ matrix.module }}/target/site
remote: /var/www/html/reports/development/${{ env.xb_version }}/${{ github.ref_name }}/biodata/${{ 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
42 changes: 6 additions & 36 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,14 @@ on:
- release-*

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

sonar:
uses: opencb/java-common-libs/.github/workflows/sonar-analysis-workflow.yml@develop
needs: build
with:
sonarProjectKey: opencb_biodata
test:
uses: opencb/biodata/.github/workflows/build-test.yml@develop
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test:
name: Test biodata
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '10'
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Install Samtools
run: sudo apt-get install samtools
- name: Run tests with Maven
run: mvn -T 2 clean install -DskipTests
# run: mvn surefire-report:report
# - name: Deploy tests web recursively to remote
# uses: garygrossgarten/github-action-scp@release
# with:
# local: biodata-tools/target
# remote: /mnt/data/opencb/biodata/tests/${{ needs.build.outputs.version }}/${{ github.ref_name }}/${{ github.sha }}
# host: ${{ secrets.SSH_SWDEV_IP }}
# username: ${{ secrets.SSH_SWDEV_USER }}
# password: ${{ secrets.SSH_SWDEV_PASSWORD }}
SSH_TESTING_SERVER_HOST: ${{ secrets.SSH_TESTING_SERVER_HOST}}
SSH_TESTING_SERVER_PORT: ${{ secrets.SSH_TESTING_SERVER_PORT}}
SSH_TESTING_SERVER_USER: ${{ secrets.SSH_TESTING_SERVER_USER }}
SSH_TESTING_SERVER_PASSWORD: ${{ secrets.SSH_TESTING_SERVER_PASSWORD }}

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
Expand Down
38 changes: 7 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,14 @@ on:
- '*'

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

sonar:
uses: opencb/java-common-libs/.github/workflows/sonar-analysis-workflow.yml@develop
needs: build
with:
sonarProjectKey: opencb_biodata
test:
uses: opencb/biodata/.github/workflows/build-test.yml@develop
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test:
name: Test biodata
runs-on: ubuntu-20.04
needs: build
strategy:
matrix:
mongodb: ["4.2"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '10'
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Install Samtools
run: sudo apt-get install samtools
- name: Run tests with Maven
run: mvn -T 2 clean install -DskipTests
SSH_TESTING_SERVER_HOST: ${{ secrets.SSH_TESTING_SERVER_HOST}}
SSH_TESTING_SERVER_PORT: ${{ secrets.SSH_TESTING_SERVER_PORT}}
SSH_TESTING_SERVER_USER: ${{ secrets.SSH_TESTING_SERVER_USER }}
SSH_TESTING_SERVER_PASSWORD: ${{ secrets.SSH_TESTING_SERVER_PASSWORD }}

deploy-maven:
uses: opencb/java-common-libs/.github/workflows/deploy-maven-repository-workflow.yml@develop
Expand All @@ -50,4 +26,4 @@ jobs:

release:
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@develop
needs: deploy-maven
needs: test
35 changes: 7 additions & 28 deletions .github/workflows/task.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
name: Push biodata develop
name: Push biodata task

on:
push:
branches:
- TASK-*

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

sonar:
uses: opencb/java-common-libs/.github/workflows/sonar-analysis-workflow.yml@develop
needs: build
with:
sonarProjectKey: opencb_biodata
test:
uses: opencb/biodata/.github/workflows/build-test.yml@develop
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test:
name: Test biodata
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '10'
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Install Samtools
run: sudo apt-get install samtools
- name: Run tests and create report with Maven
run: mvn -T 2 clean install -DskipTests
SSH_TESTING_SERVER_HOST: ${{ secrets.SSH_TESTING_SERVER_HOST}}
SSH_TESTING_SERVER_PORT: ${{ secrets.SSH_TESTING_SERVER_PORT}}
SSH_TESTING_SERVER_USER: ${{ secrets.SSH_TESTING_SERVER_USER }}
SSH_TESTING_SERVER_PASSWORD: ${{ secrets.SSH_TESTING_SERVER_PASSWORD }}
41 changes: 40 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,45 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<!-- <rule>-->
<!-- <element>BUNDLE</element>-->
<!-- <limits>-->
<!-- <limit>-->
<!-- <counter>COMPLEXITY</counter>-->
<!-- <value>COVEREDRATIO</value>-->
<!-- <minimum>0.60</minimum>-->
<!-- </limit>-->
<!-- </limits>-->
<!-- </rule>-->
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -259,7 +298,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.0.0-M8</version>
</plugin>
</plugins>
</reporting>
Expand Down