Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Pipeline YAML template using Airflow 2 operators (#138)
* new DAG operator imports for Airflow 2.0+ * support Airflow 2 operators when generating DAGs * version compatibility checks for DAGs and Airflow environments * tests to copy pipeline.yaml to dot folder (for airflow version spec) * tests for version compatibility checks * revised pipeline YAML template for Airflow 1 compat * feat!: Upgrade dependencies to Airflow 2.1.1 (#135) * revised dependendices for Airflow 2.1.1 * use proper variables file as required by Airflow 2 * changed README to use Airflow 2 requirement * uncommented deploy_dag_versioning check * feat: Upgrade `usa_names` pipeline to usse Airflow 2 operators and environment (#136) * default to Airflow 2 * README revisions for old and new YAML references * sample pipeline YAML template for Airflow 2 operators * add license header to unit-tests * require airflow_version to be explicitly stated * set default Cloud Composer version to Airflow 2 * tests to verify correct Airflow operators based on version specified * additional GitHub check for unit testing Airflow 1 pipelines * set default Airflow version to 2 * retrigger checks
- Loading branch information
1 parent
b2749c6
commit 90ae7cd
Showing
10 changed files
with
627 additions
and
118 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,41 @@ | ||
# Copyright 2021 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Run unit tests for Airflow 1.10 operators | ||
on: [pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: hashicorp/setup-terraform@v1 | ||
with: | ||
terraform_version: 0.15.1 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install pipenv | ||
run: pip install pipenv | ||
- name: Install dependencies | ||
run: pipenv install --ignore-pipfile --dev | ||
- name: Initialize Airflow | ||
run: pipenv run airflow db init | ||
- name: Setup Airflow 1.10 pipeline YAML config | ||
run: cp samples/pipeline.airflow1.yaml samples/pipeline.yaml | ||
- name: Run tests | ||
run: pipenv run python -m pytest -v |
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
Oops, something went wrong.