Merge branch 'datahub-project:master' into master #104
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
name: Airflow Plugin | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- ".github/workflows/airflow-plugin.yml" | |
- "metadata-ingestion-modules/airflow-plugin/**" | |
- "metadata-ingestion/**" | |
- "metadata-models/**" | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- ".github/workflows/airflow-plugin.yml" | |
- "metadata-ingestion-modules/airflow-plugin/**" | |
- "metadata-ingestion/**" | |
- "metadata-models/**" | |
release: | |
types: [published] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
airflow-plugin: | |
runs-on: ubuntu-latest | |
env: | |
SPARK_VERSION: 3.0.3 | |
DATAHUB_TELEMETRY_ENABLED: false | |
strategy: | |
matrix: | |
include: | |
# Note: this should be kept in sync with tox.ini. | |
- python-version: "3.8" | |
extra_pip_requirements: "apache-airflow~=2.1.4" | |
extra_pip_extras: plugin-v1 | |
- python-version: "3.8" | |
extra_pip_requirements: "apache-airflow~=2.2.4" | |
extra_pip_extras: plugin-v1 | |
- python-version: "3.10" | |
extra_pip_requirements: 'apache-airflow~=2.4.0 pluggy==1.0.0 "pendulum<3.0"' | |
extra_pip_extras: plugin-v2 | |
- python-version: "3.10" | |
extra_pip_requirements: 'apache-airflow~=2.6.0 "pendulum<3.0"' | |
extra_pip_extras: plugin-v2 | |
- python-version: "3.10" | |
extra_pip_requirements: "apache-airflow>=2.7.0 pydantic==2.4.2" | |
extra_pip_extras: plugin-v2 | |
fail-fast: false | |
steps: | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
- uses: gradle/gradle-build-action@v2 | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install dependencies | |
run: ./metadata-ingestion/scripts/install_deps.sh | |
- name: Install airflow package and test (extras ${{ matrix.extra_pip_requirements }}) | |
run: ./gradlew -Pextra_pip_requirements='${{ matrix.extra_pip_requirements }}' -Pextra_pip_extras='${{ matrix.extra_pip_extras }}' :metadata-ingestion-modules:airflow-plugin:lint :metadata-ingestion-modules:airflow-plugin:testQuick | |
- name: pip freeze show list installed | |
if: always() | |
run: source metadata-ingestion-modules/airflow-plugin/venv/bin/activate && pip freeze | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() && matrix.python-version == '3.10' && matrix.extra_pip_requirements == 'apache-airflow>=2.7.0' }} | |
with: | |
name: Test Results (Airflow Plugin ${{ matrix.python-version}}) | |
path: | | |
**/build/reports/tests/test/** | |
**/build/test-results/test/** | |
**/junit.*.xml | |
!**/binary/** | |
- name: Upload coverage to Codecov | |
if: always() | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: . | |
fail_ci_if_error: false | |
flags: airflow-${{ matrix.python-version }}-${{ matrix.extraPythonRequirement }} | |
name: pytest-airflow | |
verbose: true | |
event-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Event File | |
path: ${{ github.event_path }} |