-
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
5a6d1cd
commit a825c3f
Showing
10 changed files
with
205 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 2% | ||
only_pulls: true |
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,3 @@ | ||
[run] | ||
omit = | ||
tests/* |
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
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,26 @@ | ||
#!/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 | ||
|
||
pip install apache-airflow-providers-cncf-kubernetes --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=dagfactory \ | ||
--cov-report=term-missing \ | ||
--cov-report=xml \ | ||
--durations=0 \ | ||
--ignore=tests/test_example_dags.py |
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 \ | ||
--ignore=tests/test_example_dags.py |
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