-
Notifications
You must be signed in to change notification settings - Fork 2
120 lines (116 loc) · 4.59 KB
/
test-xetabase.yml
File metadata and controls
120 lines (116 loc) · 4.59 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: TEST Xetabase and publish report workflow
# Workflow to run Xetabase-specific tests
# Triggered on push and pull request events
on:
push:
pull_request:
jobs:
test-xetabase:
runs-on: ubuntu-latest
steps:
# Check out the repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Install dependencies
- name: Install dependencies
run: pip install -r requirements.txt
# Run Xetabase tests
- name: Run Xetabase tests
run: pytest tests/xetabase
test:
name: Execute JUnit and Jacoco tests
runs-on: ${{ vars.UBUNTU_VERSION }}
steps:
# Checkout ci-core en la raíz para que las acciones locales estén siempre disponibles
- name: Checkout ci-core (main)
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
repository: opencb/ci-core
path: ci-core
# Checkout el repo que dispara el workflow en workspace/
- name: Checkout triggering repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
path: workspace
- name: Retrieve secrets from Keeper
id: ksecrets
uses: Keeper-Security/ksm-action@master
with:
keeper-secret-config: ${{ secrets.KEEPER_SM_GH_OPENCB }}
secrets: |
AZURE_KUBE_CONFIG/field/Secret Value > env:AZURE_KUBE_CONFIG
DOCKER_HUB_USER/field/Secret Value > env:DOCKER_HUB_USER
DOCKER_HUB_PASSWORD/field/Secret Value > env:DOCKER_HUB_PASSWORD
SSH_TESTING_SERVER_HOST/field/Secret Value > env:SSH_HOST
SSH_TESTING_SERVER_PORT/field/Secret Value > env:SSH_PORT
SSH_TESTING_SERVER_USER/field/Secret Value > env:SSH_USER
SSH_TESTING_SERVER_PASSWORD/field/Secret Value > env:SSH_PASS
- name: Prepare enterprise, OpenCGA and dependencies
id: prepare
uses: ./ci-core/.github/actions/prepare-opencga-enterprise
with:
enterprise_ref: ${{ inputs.branch != '' && inputs.branch || github.ref_name }}
clone_dependencies: "true"
env:
ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}
- name: Set up Java and Maven cache
# Uses dependencies_sha to make the cache key sensitive to dependency commits
uses: ./ci-core/.github/actions/setup-java-maven
with:
storage_hadoop: ${{ vars.HADOOP_FLAVOUR }}
java_version: "8"
- name: Install Samtools
run: sudo apt-get install samtools python3-deeptools
- name: Start MongoDB v6.0
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: 6.0
mongodb-replica-set: rs-test
- name: Install sshpass
run: sudo apt-get install sshpass
- name: Add SSH Host to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -p ${{ env.SSH_PORT }} ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
env:
SSH_HOST: ${{ env.SSH_HOST }}
SSH_PORT: ${{ env.SSH_PORT }}
- name: Create opencga-home symlink
run: |
ln -s "$GITHUB_WORKSPACE/workspace/opencga" "$GITHUB_WORKSPACE/workspace/opencga-enterprise/opencga-home"
- name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, opencga and opencga-enterprise
run: |
cd "$GITHUB_WORKSPACE/workspace/opencga-enterprise"
./build.sh --test --test-level runShortTests --prepare-branches --test-save-reports --task ${{ inputs.task }} --storage-hadoop ${{ vars.HADOOP_FLAVOUR }} --prepare-hadoop --github
env:
THIRDPARTY_READ_TOKEN: ${{ secrets.THIRDPARTY_READ_TOKEN }}
- name: Upload reports results to Github
uses: actions/upload-artifact@v4
with:
name: report-test
path: ${{ github.workspace }}/workspace/opencga-enterprise/reports/
if-no-files-found: error
- name: Upload log
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: build-log
path: |
${{ github.workspace }}/workspace/opencga-enterprise/build.log
${{ github.workspace }}/workspace/opencga-enterprise/reports/*.log.gz
if-no-files-found: error
- name: Log summary
run: |
cat "$GITHUB_WORKSPACE/workspace/opencga-enterprise/build.log" | tee -a $GITHUB_STEP_SUMMARY