Skip to content

VO-specific tests

VO-specific tests #709

Workflow file for this run

name: VO-specific tests
on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
runtime_images:
name: Build Runtime Images
uses: ./.github/workflows/runtime_images.yml
permissions:
packages: write
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Update pip
run: python3 -m pip install -U pip setuptools
- name: Install python requirements for matrix_parser.py
run: python3 -m pip install -U PyYAML
- name: Identify branch
id: branch
run: python3 tools/github/workflow/set_branch_output_env.py
- name: Identify Matrix
id: matrix
run: echo "matrix=$(./tools/test/votest_helper.py)" >> $GITHUB_OUTPUT
outputs:
branch: ${{ steps.branch.outputs.branch }}
matrix: ${{ steps.matrix.outputs.matrix }}
test:
needs: [runtime_images, setup]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cfg: ${{ fromJson(needs.setup.outputs.matrix) }}
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up Docker Buildx
if: needs.runtime_images.outputs.build_locally == 'true'
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Login to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set repository variable
id: repo
run: echo "repo=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Build Python 3.9 image locally
if: needs.runtime_images.outputs.build_locally == 'true'
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: etc/docker/test/runtime.Dockerfile
target: final
build-args: |
PYTHON=3.9
push: false
tags: ${{ needs.runtime_images.outputs.py39_image }}
outputs: type=docker
cache-from: type=registry,ref=ghcr.io/${{ steps.repo.outputs.repo }}/rucio-dev-runtime:py39-buildcache
- name: Run test with cfg
env:
PY39_RUNTIME_IMAGE: ${{ needs.runtime_images.outputs.py39_image }}
BUILD_LOCALLY: ${{ needs.runtime_images.outputs.build_locally }}
run: |
echo '{"matrix": ${{ toJson(matrix.cfg) }}, "runtime_images": {"3.9": "${{ needs.runtime_images.outputs.py39_image }}"}, "build_locally": "${{ needs.runtime_images.outputs.build_locally }}" }' | ./tools/test/run_tests.py