Skip to content

Commit

Permalink
Merge pull request #68 from bryzgaloff/v1.0.0-dev
Browse files Browse the repository at this point in the history
Airflow ClickHouse Plugin v1.0.0
  • Loading branch information
bryzgaloff authored Sep 3, 2023
2 parents 368f69a + 141b402 commit 68666f5
Show file tree
Hide file tree
Showing 36 changed files with 1,274 additions and 1,157 deletions.
72 changes: 61 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run tests
name: Unit & Integration Tests

on:
push:
Expand All @@ -10,7 +10,6 @@ on:
- "tests/**"
- ".github/workflows/tests.yml"
- "requirements.txt"
- "Makefile"
pull_request:
branches: [ "master" ]
paths:
Expand All @@ -20,15 +19,18 @@ on:
- "tests/**"
- ".github/workflows/tests.yml"
- "requirements.txt"
- "Makefile"

env:
PYTHONPATH: "src" # for tests to import src/airflow_clickhouse_plugin

jobs:
unit-tests:

unit-tests-no-common-sql:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
airflow-version: ["2.0.2", "2.2.5", "2.3.4", "2.4.3", "2.5.0","2.6.0"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
airflow-version: ["2.0.2", "2.1.4", "2.2.5", "2.3.4", "2.4.3", "2.5.3", "2.6.3"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -41,13 +43,34 @@ jobs:
python -m pip install -r requirements.txt --ignore-installed apache-airflow==${{ matrix.airflow-version }}
- name: Run unit tests
run: |
make unit
integration-tests:
python -m unittest discover -t tests -s unit -p test_clickhouse.py
unit-tests-common-sql:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
airflow-version: ["2.1.4", "2.2.5", "2.3.4", "2.4.3", "2.5.3", "2.6.3"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt --ignore-installed apache-airflow[common.sql]==${{ matrix.airflow-version }}
- name: Run unit tests
run: |
python -m unittest discover -t tests -s unit
integration-tests-no-common-sql:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
airflow-version: ["2.0.2", "2.2.5", "2.3.4", "2.4.3", "2.5.0","2.6.0"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
airflow-version: ["2.0.2", "2.1.4", "2.2.5", "2.3.4", "2.4.3", "2.5.3", "2.6.3"]
services:
clickhouse:
image: yandex/clickhouse-server
Expand All @@ -67,4 +90,31 @@ jobs:
env:
AIRFLOW_CONN_CLICKHOUSE_DEFAULT: "clickhouse://localhost:${{ job.services.clickhouse.ports['9000'] }}"
run: |
make integration
python -m unittest discover -t tests -s integration -p test_clickhouse.py
integration-tests-common-sql:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
airflow-version: ["2.1.4", "2.2.5", "2.3.4", "2.4.3", "2.5.3", "2.6.3"]
services:
clickhouse:
image: yandex/clickhouse-server
ports:
- 9000/tcp
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt --ignore-installed apache-airflow[common.sql]==${{ matrix.airflow-version }}
- name: Run tests on ClickHouse server
env:
AIRFLOW_CONN_CLICKHOUSE_DEFAULT: "clickhouse://localhost:${{ job.services.clickhouse.ports['9000'] }}"
run: |
python -m unittest discover -t tests -s integration
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2019-2020 Whisk, https://whisk.com
Copyright (c) 2019-2023 Anton Bryzgalov, tony.bryzgaloff@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 0 additions & 34 deletions Makefile

This file was deleted.

Loading

0 comments on commit 68666f5

Please sign in to comment.