This repository was archived by the owner on Mar 12, 2026. It is now read-only.
fetch-depth set to 0 and fetch-tags: true #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |