mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-28 20:09:01 +08:00
Bumps the actions group with 1 update: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv). Updates `astral-sh/setup-uv` from 10.3.3 to 10.4.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v10.3.3...v10.4.0) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 10.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
252 lines
11 KiB
YAML
252 lines
11 KiB
YAML
name: Integration
|
|
on:
|
|
push:
|
|
paths:
|
|
- '**'
|
|
- '!client/**'
|
|
- '!doc/**'
|
|
- '!lib/galaxy_test/selenium/**'
|
|
- '!packages/test_selenium/**'
|
|
- '!.github/workflows/**'
|
|
- '.github/workflows/integration.yaml'
|
|
# Test suites and test-only libraries used by other workflows. Code shared
|
|
# with integration tests belongs in lib/galaxy_test/base.
|
|
- '!test/unit/**'
|
|
- '!test/integration_selenium/**'
|
|
- '!lib/galaxy_test/api/**'
|
|
- '!lib/galaxy_test/selenium/**'
|
|
- '!lib/galaxy_test/workflow/**'
|
|
- '!lib/galaxy/selenium/**'
|
|
pull_request:
|
|
paths:
|
|
- '**'
|
|
- '!client/**'
|
|
- '!doc/**'
|
|
- '!lib/galaxy_test/selenium/**'
|
|
- '!packages/test_selenium/**'
|
|
- '!.github/workflows/**'
|
|
- '.github/workflows/integration.yaml'
|
|
# Test suites and test-only libraries used by other workflows. Code shared
|
|
# with integration tests belongs in lib/galaxy_test/base.
|
|
- '!test/unit/**'
|
|
- '!test/integration_selenium/**'
|
|
- '!lib/galaxy_test/api/**'
|
|
- '!lib/galaxy_test/selenium/**'
|
|
- '!lib/galaxy_test/workflow/**'
|
|
- '!lib/galaxy/selenium/**'
|
|
schedule:
|
|
# Run at midnight UTC every Tuesday
|
|
- cron: '0 0 * * 2'
|
|
workflow_dispatch:
|
|
env:
|
|
GALAXY_TEST_RAISE_EXCEPTION_ON_HISTORYLESS_HDA: '1'
|
|
GALAXY_CONFIG_SQLALCHEMY_WARN_20: '1'
|
|
GALAXY_DEPENDENCIES_INSTALL_WEASYPRINT: '1'
|
|
GALAXY_DEPENDENCIES_INSTALL_HTCONDOR: '1'
|
|
UV_HTTP_RETRIES: '6'
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
permissions: {}
|
|
jobs:
|
|
prepare-mulled-cache:
|
|
if: >-
|
|
github.event_name != 'push'
|
|
|| github.repository_owner != 'galaxyproject'
|
|
|| github.ref_name == 'dev'
|
|
|| startsWith(github.ref_name, 'release_')
|
|
name: Prepare mulled resolution cache
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Select weekly cache
|
|
run: echo "MULLED_CACHE_WEEK=$(date -u +%G-%V)" >> "$GITHUB_ENV"
|
|
- name: Restore Biocontainers repository index
|
|
id: restore-mulled-cache
|
|
uses: actions/cache/restore@v6.1.0
|
|
with:
|
|
key: biocontainers-repository-index-${{ env.MULLED_CACHE_WEEK }}
|
|
path: '${{ runner.temp }}/mulled-resolution-seed'
|
|
- name: Check out Galaxy for mulled-cache
|
|
if: steps.restore-mulled-cache.outputs.cache-hit != 'true'
|
|
uses: actions/checkout@v7.0.1
|
|
with:
|
|
path: 'galaxy cache source'
|
|
persist-credentials: false
|
|
- name: Install uv
|
|
if: steps.restore-mulled-cache.outputs.cache-hit != 'true'
|
|
uses: astral-sh/setup-uv@v10.4.0
|
|
with:
|
|
version-file: galaxy cache source/.tool-versions
|
|
python-version: '3.11'
|
|
prune-cache: true
|
|
- name: Fetch Biocontainers repository index
|
|
id: fetch-mulled-cache
|
|
if: steps.restore-mulled-cache.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
env:
|
|
SEED_DIRECTORY: '${{ runner.temp }}/mulled-resolution-seed'
|
|
run: |
|
|
uv tool run --from './galaxy cache source/packages/tool_util' mulled-cache \
|
|
--namespace biocontainers \
|
|
--output "$SEED_DIRECTORY/biocontainers.json"
|
|
- name: Save Biocontainers repository index
|
|
if: steps.restore-mulled-cache.outputs.cache-hit != 'true' && steps.fetch-mulled-cache.outcome == 'success'
|
|
uses: actions/cache/save@v6.1.0
|
|
with:
|
|
key: biocontainers-repository-index-${{ env.MULLED_CACHE_WEEK }}
|
|
path: '${{ runner.temp }}/mulled-resolution-seed'
|
|
- name: Create fallback seed
|
|
if: steps.fetch-mulled-cache.outcome == 'failure'
|
|
env:
|
|
SEED_DIRECTORY: '${{ runner.temp }}/mulled-resolution-seed'
|
|
run: |
|
|
echo '::warning::Could not index the biocontainers namespace, integration tests run without a seeded mulled resolution cache'
|
|
mkdir -p "$SEED_DIRECTORY"
|
|
echo '{"namespace":"biocontainers","repositories":[]}' > "$SEED_DIRECTORY/biocontainers.json"
|
|
- name: Upload mulled resolution cache seed
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: mulled-resolution-cache-seed
|
|
path: '${{ runner.temp }}/mulled-resolution-seed/biocontainers.json'
|
|
retention-days: 1
|
|
|
|
test:
|
|
if: >-
|
|
github.event_name != 'push'
|
|
|| github.repository_owner != 'galaxyproject'
|
|
|| github.ref_name == 'dev'
|
|
|| startsWith(github.ref_name, 'release_')
|
|
name: Test
|
|
needs: prepare-mulled-cache
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ['3.11']
|
|
# The host-services lane runs the tests that need minikube, the AMQP broker in it or the
|
|
# host's Docker image cache, one test class at a time; the default lane runs the rest.
|
|
lane: ['default']
|
|
chunk: ['0', '1']
|
|
include:
|
|
- python-version: '3.11'
|
|
lane: 'host-services'
|
|
steps:
|
|
- if: github.event_name == 'schedule'
|
|
run: |
|
|
# A default for tests that don't set a metadata strategy themselves.
|
|
echo "GALAXY_TEST_METADATA_STRATEGY=extended" >> $GITHUB_ENV
|
|
# --cov=lib line-traces a live Galaxy for the whole job, so integration
|
|
# coverage is collected on this weekly run only.
|
|
echo "GALAXY_TEST_COVERAGE=1" >> $GITHUB_ENV
|
|
# Skip outputs_to_working_directory: true in integration tests, doesn't work with pulsar
|
|
# echo "GALAXY_CONFIG_OVERRIDE_OUTPUTS_TO_WORKING_DIRECTORY=true" >> $GITHUB_ENV
|
|
- name: Pull Docker Hub images through mirror.gcr.io
|
|
# Google's cache of Docker Hub, so that tests don't fail on Docker Hub
|
|
# rate limits and outages. The daemon falls back to Docker Hub for images
|
|
# that are not cached. Must run before anything starts containers, as
|
|
# restarting the daemon stops them. Apptainer pulls are not affected.
|
|
run: |
|
|
[ -s /etc/docker/daemon.json ] || echo '{}' | sudo tee /etc/docker/daemon.json
|
|
jq '."registry-mirrors" = ["https://mirror.gcr.io"]' /etc/docker/daemon.json > "$RUNNER_TEMP/daemon.json"
|
|
sudo mv "$RUNNER_TEMP/daemon.json" /etc/docker/daemon.json
|
|
cat /etc/docker/daemon.json
|
|
sudo systemctl restart docker
|
|
docker info --format '{{.RegistryConfig.Mirrors}}' | grep -q mirror.gcr.io
|
|
- name: Prune unused docker image, volumes and containers
|
|
run: docker system prune -a -f
|
|
- name: Clean dotnet folder for space
|
|
run: rm -Rf /usr/share/dotnet
|
|
- name: Install packages
|
|
# ffmpeg: ffprobe needed by media datatypes
|
|
# bubblewrap: exercises the expression-evaluation isolation sandbox integration test.
|
|
# Ubuntu >=24.04 restricts unprivileged user namespaces (which bwrap needs); allow them.
|
|
run: |
|
|
sudo apt-get update && sudo apt-get -y install ffmpeg bubblewrap
|
|
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
|
|
- name: Start Postgres
|
|
# A service container would not survive the Docker daemon restart and prune above.
|
|
if: matrix.lane == 'default'
|
|
run: |
|
|
docker run -d --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:18
|
|
for _ in $(seq 60); do
|
|
docker exec postgres pg_isready -U postgres -h 127.0.0.1 && exit 0
|
|
sleep 1
|
|
done
|
|
docker logs postgres
|
|
exit 1
|
|
- name: Create the CNI config directory minikube's none driver expects
|
|
if: matrix.lane == 'host-services'
|
|
# The action chmods /etc/cni/net.d without creating it, and current
|
|
# runner images no longer ship the directory. See
|
|
# https://github.com/medyagh/setup-minikube/issues/835
|
|
run: sudo mkdir -p /etc/cni/net.d
|
|
- name: Setup Minikube
|
|
if: matrix.lane == 'host-services'
|
|
uses: medyagh/setup-minikube@latest
|
|
with:
|
|
driver: none
|
|
container-runtime: docker
|
|
kubernetes-version: '1.28.0'
|
|
- name: Check pods
|
|
if: matrix.lane == 'host-services'
|
|
run: kubectl get pods -A
|
|
- uses: actions/checkout@v7.0.1
|
|
with:
|
|
path: 'galaxy root'
|
|
persist-credentials: false
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v10.4.0
|
|
with:
|
|
version-file: galaxy root/.tool-versions
|
|
python-version: ${{ matrix.python-version }}
|
|
prune-cache: true
|
|
- name: Install Python
|
|
run: uv python install
|
|
- name: Download mulled resolution cache seed
|
|
id: download-mulled-seed
|
|
# The artifact expires after a day, which would fail "Re-run failed jobs"
|
|
# later on, as that does not re-run the prepare job.
|
|
continue-on-error: true
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: mulled-resolution-cache-seed
|
|
path: '${{ runner.temp }}/mulled-resolution-seed'
|
|
- name: Create fallback seed
|
|
if: steps.download-mulled-seed.outcome == 'failure'
|
|
env:
|
|
SEED_DIRECTORY: '${{ runner.temp }}/mulled-resolution-seed'
|
|
run: |
|
|
echo '::warning::Could not download the mulled resolution cache seed, integration tests run without a seeded mulled resolution cache'
|
|
mkdir -p "$SEED_DIRECTORY"
|
|
echo '{"namespace":"biocontainers","repositories":[]}' > "$SEED_DIRECTORY/biocontainers.json"
|
|
- name: Install Apptainer's singularity
|
|
uses: './galaxy root/.github/actions/install_apptainer'
|
|
- name: Run tests
|
|
env:
|
|
GALAXY_TEST_INTEGRATION_LANE: ${{ matrix.lane }}
|
|
GALAXY_TEST_MULLED_RESOLUTION_CACHE_SEED: '${{ runner.temp }}/mulled-resolution-seed/biocontainers.json'
|
|
GALAXY_CONFIG_OVERRIDE_MULLED_RESOLUTION_CACHE_DATA_DIR: '${{ runner.temp }}/mulled-resolution-cache/data'
|
|
GALAXY_CONFIG_OVERRIDE_MULLED_RESOLUTION_CACHE_LOCK_DIR: '${{ runner.temp }}/mulled-resolution-cache/locks'
|
|
# The seed is written once at session start and must outlive the whole shard
|
|
# (bounded by GitHub's default 6 hour job timeout).
|
|
GALAXY_CONFIG_OVERRIDE_MULLED_RESOLUTION_CACHE_EXPIRE: '21600'
|
|
run: |
|
|
if [ "${{ matrix.lane }}" = "host-services" ]; then
|
|
. .ci/minikube-test-setup/start_services.sh
|
|
./run_tests.sh -integration test/integration
|
|
else
|
|
export GALAXY_TEST_DBURI='postgresql+psycopg://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8'
|
|
./run_tests.sh -integration test/integration -- --num-shards=2 --shard-id=${{ matrix.chunk }} -n 3 --dist loadscope --no-loadscope-reorder
|
|
fi
|
|
working-directory: 'galaxy root'
|
|
- uses: codecov/codecov-action@v7.1.1
|
|
if: github.event_name == 'schedule'
|
|
with:
|
|
flags: integration
|
|
working-directory: 'galaxy root'
|
|
- uses: actions/upload-artifact@v7
|
|
if: failure()
|
|
with:
|
|
name: Integration test results (${{ matrix.python-version }}, ${{ matrix.lane }}, ${{ matrix.chunk }})
|
|
path: 'galaxy root/run_integration_tests.html'
|