-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install Airflow with different versions in CI & run corresponding jobs
- Loading branch information
1 parent
79cde23
commit 1541509
Showing
5 changed files
with
136 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
AIRFLOW_VERSION="$1" | ||
PYTHON_VERSION="$2" | ||
|
||
# Use this to set the appropriate Python environment in Github Actions, | ||
# while also not assuming --system when running locally. | ||
if [ "$GITHUB_ACTIONS" = "true" ] && [ -z "${VIRTUAL_ENV}" ]; then | ||
py_path=$(which python) | ||
virtual_env_dir=$(dirname "$(dirname "$py_path")") | ||
export VIRTUAL_ENV="$virtual_env_dir" | ||
fi | ||
|
||
echo "${VIRTUAL_ENV}" | ||
|
||
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-$AIRFLOW_VERSION.0/constraints-$PYTHON_VERSION.txt" | ||
curl -sSL $CONSTRAINT_URL -o /tmp/constraint.txt | ||
# Workaround to remove PyYAML constraint that will work on both Linux and MacOS | ||
sed '/PyYAML==/d' /tmp/constraint.txt > /tmp/constraint.txt.tmp | ||
mv /tmp/constraint.txt.tmp /tmp/constraint.txt | ||
# Install Airflow with constraints | ||
pip install uv | ||
uv pip install "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt | ||
|
||
rm /tmp/constraint.txt |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pytest \ | ||
-vv \ | ||
--cov=cosmos \ | ||
--cov-report=term-missing \ | ||
--cov-report=xml \ | ||
--durations=0 \ | ||
-m "not (integration or perf)" \ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pytest \ | ||
-vv \ | ||
--durations=0 \ | ||
-m "not (integration or perf)" \ |