forked from opencb/opencga
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (82 loc) · 3.61 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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.7.0"
jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient -Dopencga.war.name=opencga -Dcheckstyle.skip
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: Start MongoDB v5.0
uses: supercharge/[email protected]
with:
mongodb-version: 5.0
mongodb-replica-set: rs-test
- name: Test and Analyze
env:
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 -DskipTests -Dcheckstyle.skip #-B verify surefire-report:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_opencga
# - 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-analisis","opencga-app","opencga-catalog","opencga-client","opencga-clinical","opencga-core","opencga-master","opencga-server","opencga-storage","opencga-test","opencga-storage/opencga-storage-app","opencga-storage/opencga-storage-benchmark","opencga-storage/opencga-storage-core","opencga-storage/opencga-storage-hadoop","opencga-storage/opencga-storage-mongodb","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: Check for file
# id: file_check
# run: |
# if [ -d "${{ matrix.module }}" ]; then
# echo "check_result=true" >> $GITHUB_OUTPUT
# else
# echo "check_result=false" >> $GITHUB_OUTPUT
# fi
# - name: Deploy unit tests web recursively to remote
# if: steps.file_check.outputs.check_result == 'true'
# uses: garygrossgarten/github-action-scp@release
# with:
# local: ${{ matrix.module }}/target/site
# remote: /var/www/html/reports/development/${{ 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