Skip to content

Bump dotenv from 16.3.2 to 16.4.1 in /ui #142

Bump dotenv from 16.3.2 to 16.4.1 in /ui

Bump dotenv from 16.3.2 to 16.4.1 in /ui #142

name: Integration tests
on:
pull_request:
paths:
- .github/workflows/integration-tests.yaml
- "**/*.py"
- requirements.txt
- requirements-dev.txt
- ui/**
- .nvmrc
- Dockerfile
push:
branches:
- main
jobs:
compatibility-tests:
name: "Check compatibility with Prefect ${{ matrix.prefect-version }}"
timeout-minutes: 10
strategy:
matrix:
prefect-version:
# These versions correspond to Prefect image tags, the patch version is
# excluded to always pull the latest patch of each minor version.
- "2.0"
- "2.1"
- "2.2"
- "2.3"
- "2.4"
- "2.5"
- "2.6"
- "2.7"
- "2.8"
- "2.9"
- "2.10"
- "2.11"
- "2.12"
- "2.13"
- "2.14"
# We can include the following to always test against the last release
# but the value is not particularly clear and we can just append the
# last minor version at each release time
# - "2"
include:
# While old clients should always be supported by new servers, a new
# client may send data that an old server does not support. These
# incompatibilities are allowed.
# All servers prior to 2.6.0 will not accept 2.6.0+ result types
- prefect-version: "2.0"
server-incompatible: true
- prefect-version: "2.1"
server-incompatible: true
- prefect-version: "2.2"
server-incompatible: true
- prefect-version: "2.3"
server-incompatible: true
- prefect-version: "2.4"
server-incompatible: true
- prefect-version: "2.5"
server-incompatible: true
# 2.6 containers have a bad version of httpcore installed
- prefect-version: "2.6"
extra_docker_run_options: '--env EXTRA_PIP_PACKAGES="httpcore>=0.16.2"'
server_command: "prefect orion start"
# 2.6/2.7 require `prefect orion start` instead of prefect server start
- prefect-version: "2.7"
server_command: "prefect orion start"
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "requirements*.txt"
- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager -e .[dev]
- name: Start server@${{ matrix.prefect-version }}
if: ${{ ! matrix.server-incompatible }}
run: >
docker run
--name "prefect-server-${{ matrix.prefect-version }}"
--detach
--publish 4200:4200
${{ matrix.extra_docker_run_options }}
prefecthq/prefect:${{ matrix.prefect-version }}-python3.10
${{ matrix.server_command || 'prefect server start' }} --host 0.0.0.0
PREFECT_API_URL="http://127.0.0.1:4200/api"
./scripts/wait-for-server.py
# TODO: Replace `wait-for-server` with dedicated command
# https://github.com/PrefectHQ/prefect/issues/6990
- name: Run integration flows with client@dev, server@${{ matrix.prefect-version }}
if: ${{ ! matrix.server-incompatible }}
run: >
TEST_SERVER_VERSION=${{ matrix.prefect-version }}
PREFECT_API_URL="http://127.0.0.1:4200/api"
TEST_CLIENT_VERSION=$(python -c 'import prefect; print(prefect.__version__)')
./scripts/run-integration-flows.py
- name: Start server@dev
run: |
# First, we must stop the server container if it exists
# TODO: Once we have `prefect server stop` we can run these tests first and the
# optional tests above second
# https://github.com/PrefectHQ/prefect/issues/6989
docker stop "prefect-server-${{ matrix.prefect-version }}" || echo "That's okay!"
prefect server start&
PREFECT_API_URL="http://127.0.0.1:4200/api" ./scripts/wait-for-server.py
- name: Run integration flows with client@${{ matrix.prefect-version }}, server@dev
run: >
docker run
--env PREFECT_API_URL="http://127.0.0.1:4200/api"
--env TEST_SERVER_VERSION=$(python -c 'import prefect; print(prefect.__version__)')
--env TEST_CLIENT_VERSION=${{ matrix.client_version }}
--volume $(pwd)/flows:/opt/prefect/integration/flows
--volume $(pwd)/scripts:/opt/prefect/integration/scripts
--network host
${{ matrix.extra_docker_run_options }}
prefecthq/prefect:${{ matrix.prefect-version }}-python3.10
/opt/prefect/integration/scripts/run-integration-flows.py /opt/prefect/integration/flows