Skip to content

Commit

Permalink
Update CI to run tests againt v2-0-test branch (apache#10891)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxil authored Dec 9, 2020
1 parent 32971a1 commit db166ba
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on: # yamllint disable-line rule:truthy
schedule:
- cron: '28 0 * * *'
push:
branches: ['master', 'v1-10-test', 'v1-10-stable']
branches: ['master', 'v1-10-test', 'v1-10-stable', 'v2-0-test']
pull_request:
branches: ['master', 'v1-10-test', 'v1-10-stable']
branches: ['master', 'v1-10-test', 'v1-10-stable', 'v2-0-test']

env:

Expand Down Expand Up @@ -921,7 +921,8 @@ jobs:
- verify-prod-images
- docs
if: >
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test') &&
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/v2-0-test') &&
github.event_name != 'schedule'
strategy:
matrix:
Expand Down Expand Up @@ -960,7 +961,8 @@ jobs:
- verify-ci-images
- docs
if: >
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ) &&
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/v2-0-test') &&
github.event_name != 'schedule'
strategy:
matrix:
Expand Down Expand Up @@ -995,7 +997,9 @@ jobs:
- ci-images
env:
PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test'
if: >
github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/v2-0-test'
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
Expand Down Expand Up @@ -1031,7 +1035,9 @@ jobs:
- tests-mysql
- tests-postgres
- tests-kubernetes
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test'
if: >
github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/v2-0-test'
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions CI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -732,15 +732,15 @@ The image names follow the patterns:
| | | <COMMIT_SHA> | It contains only compiled libraries and minimal set of dependencies to run Airflow. |
+--------------+----------------------------+--------------------------------+--------------------------------------------------------------------------------------------+

* <BRANCH> might be either "master" or "v1-10-test"
* <X.Y> - Python version (Major + Minor). For "master" it should be in ["3.6", "3.7", "3.8"]. For
* <BRANCH> might be either "master" or "v1-10-test" or "v2-0-test"
* <X.Y> - Python version (Major + Minor). For "master" and "v2-0-test" should be in ["3.6", "3.7", "3.8"]. For
v1-10-test it should be in ["2.7", "3.5", "3.6". "3.7", "3.8"].
* <RUN_ID> - GitHub Actions RUN_ID. You can get it from CI action job outputs (run id is printed in
logs and displayed as part of the step name. All PRs belong to some RUN_ID and this way you can
pull the very exact version of image used in that RUN_ID
* <COMMIT_SHA> - for images that get merged to "master" of "v1-10-test" the images are also tagged
* <COMMIT_SHA> - for images that get merged to "master", "v2-0-test" of "v1-10-test" the images are also tagged
with the commit SHA of that particular commit. This way you can easily find the image that was used
for testing for that "master" or "v1-10-test" test run.
for testing for that "master", "v2-0-test" or "v1-10-test" test run.

Reproducing CI Runs locally
===========================
Expand Down
6 changes: 5 additions & 1 deletion breeze
Original file line number Diff line number Diff line change
Expand Up @@ -2853,15 +2853,19 @@ function breeze::check_and_save_all_params() {
if [[ -n "${INSTALL_AIRFLOW_REFERENCE=}" ]]; then
if [[ ${INSTALL_AIRFLOW_REFERENCE=} == *1_10* ]]; then
export BRANCH_NAME="v1-10-test"
elif [[ ${INSTALL_AIRFLOW_REFERENCE=} == *2_0* ]]; then
export BRANCH_NAME="v2-0-test"
fi
elif [[ -n "${INSTALL_AIRFLOW_VERSION=}" ]]; then
if [[ ${INSTALL_AIRFLOW_VERSION=} == *1.10* ]]; then
export BRANCH_NAME="v1-10-test"
elif [[ ${INSTALL_AIRFLOW_VERSION=} == *2.0* ]]; then
export BRANCH_NAME="v2-0-test"
fi
fi

if [[ ${PYTHON_MAJOR_MINOR_VERSION} == "2.7" || ${PYTHON_MAJOR_MINOR_VERSION} == "3.5" ]]; then
if [[ ${BRANCH_NAME} == "master" ]]; then
if [[ ${BRANCH_NAME} == "master" || ${BRANCH_NAME} == "v2-0-test" ]]; then
echo
echo "${COLOR_RED_ERROR} The ${PYTHON_MAJOR_MINOR_VERSION} can only be used when installing Airflow 1.10.* ${COLOR_RESET}"
echo
Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ coverage:
- master
- v1-10-stable
- v1-10-test
- v2-0-test
if_not_found: success
if_ci_failed: error
informational: true
Expand All @@ -53,6 +54,7 @@ coverage:
- master
- v1-10-stable
- v1-10-test
- v2-0-test
if_no_uploads: error
if_not_found: success
if_ci_failed: error
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/constraints/ci_branch_constraints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ if [[ ${GITHUB_REF} == 'refs/heads/master' ]]; then
echo "::set-output name=branch::constraints-master"
elif [[ ${GITHUB_REF} == 'refs/heads/v1-10-test' ]]; then
echo "::set-output name=branch::constraints-1-10"
elif [[ ${GITHUB_REF} == 'refs/heads/v2-0-test' ]]; then
echo "::set-output name=branch::constraints-2-0"
else
echo
echo "Unexpected ref ${GITHUB_REF}. Exiting!"
Expand Down

0 comments on commit db166ba

Please sign in to comment.