-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dataset-api-add_save_method
- Loading branch information
Showing
32 changed files
with
413 additions
and
189 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
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,134 @@ | ||
name: Running tests and linter | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
plugin: | ||
type: string | ||
|
||
jobs: | ||
unit-tests: | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest ] | ||
python-version: [ "3.7", "3.8", "3.9", "3.10" ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{matrix.python-version}} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
- name: Cache python packages for Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{inputs.plugin}}-${{matrix.os}}-python-${{matrix.python-version}} | ||
restore-keys: ${{inputs.plugin}} | ||
- name: Cache python packages for Windows | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~\AppData\Local\pip\Cache | ||
key: ${{inputs.plugin}}-${{matrix.os}}-python-${{matrix.python-version}} | ||
restore-keys: ${{inputs.plugin}} | ||
- name: Install Kedro | ||
run: pip install git+https://github.com/kedro-org/kedro@main | ||
- name: Install dependencies | ||
run: | | ||
cd ${{ inputs.plugin }} | ||
pip install -r test_requirements.txt | ||
- name: Install pytables (only for kedro-datasets on windows) | ||
if: matrix.os == 'windows-latest' && inputs.plugin == 'kedro-datasets' | ||
run: pip install tables | ||
- name: pip freeze | ||
run: pip freeze | ||
- name: Run unit tests for Linux / all plugins | ||
if: matrix.os != 'windows-latest' | ||
run: make plugin=${{ inputs.plugin }} test | ||
- name: Run unit tests for Windows / kedro-airflow, kedro-docker, kedro-telemetry | ||
if: matrix.os == 'windows-latest' && inputs.plugin != 'kedro-datasets' | ||
run: | | ||
cd ${{ inputs.plugin }} | ||
pytest tests | ||
- name: Run unit tests for Windows / kedro-datasets / no spark sequential | ||
if: matrix.os == 'windows-latest' && inputs.plugin == 'kedro-datasets' && matrix.python-version == '3.10' | ||
run: | | ||
make test-no-spark-sequential | ||
- name: Run unit tests for Windows / kedro-datasets / no spark parallel | ||
if: matrix.os == 'windows-latest' && inputs.plugin == 'kedro-datasets' && matrix.python-version != '3.10' | ||
run: | | ||
make test-no-spark | ||
lint: | ||
defaults: | ||
run: | ||
shell: bash | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.8 | ||
- name: Cache python packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{inputs.plugin}}-${{matrix.os}}-python-${{matrix.python-version}} | ||
restore-keys: ${{inputs.plugin}} | ||
- name: Install dependencies | ||
run: | | ||
cd ${{ inputs.plugin }} | ||
pip install git+https://github.com/kedro-org/kedro@main | ||
pip install -r test_requirements.txt | ||
pip freeze | ||
- name: Install pre-commit hooks | ||
run: | | ||
cd ${{ inputs.plugin }} | ||
pre-commit install --install-hooks | ||
pre-commit install --hook-type pre-push | ||
- name: Run linter | ||
run: make plugin=${{ inputs.plugin }} lint | ||
|
||
e2e-tests: | ||
if: inputs.plugin != 'kedro-datasets' | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ "3.7", "3.8", "3.9", "3.10" ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{matrix.python-version}} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
- name: Cache python packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{inputs.plugin}}-${{matrix.os}}-python-${{matrix.python-version}} | ||
restore-keys: ${{inputs.plugin}} | ||
- name: Install dependencies | ||
run: | | ||
cd ${{ inputs.plugin }} | ||
pip install git+https://github.com/kedro-org/kedro@main | ||
pip install -r test_requirements.txt | ||
- name: pip freeze | ||
run: pip freeze | ||
- name: Run end to end tests | ||
# Custom shell to run kedro-docker e2e-tests because -it flag for `docker run` | ||
# isn't supported on Github Actions. See https://github.com/actions/runner/issues/241 | ||
shell: 'script -q -e -c "bash {0}"' | ||
run: make plugin=${{ inputs.plugin }} e2e-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Run checks on kedro-airflow | ||
|
||
on: | ||
push: | ||
paths: | ||
- "kedro-airflow/**" | ||
pull_request: | ||
paths: | ||
- "kedro-airflow/**" | ||
types: [ synchronize ] | ||
|
||
jobs: | ||
airflow-test: | ||
uses: ./.github/workflows/check-plugin.yml | ||
with: | ||
plugin: kedro-airflow |
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,16 @@ | ||
name: Run checks on kedro-datasets | ||
|
||
on: | ||
push: | ||
paths: | ||
- "kedro-datasets/**" | ||
pull_request: | ||
paths: | ||
- "kedro-datasets/**" | ||
types: [ synchronize ] | ||
|
||
jobs: | ||
datasets-test: | ||
uses: ./.github/workflows/check-plugin.yml | ||
with: | ||
plugin: kedro-datasets |
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,16 @@ | ||
name: Run checks on kedro-docker | ||
|
||
on: | ||
push: | ||
paths: | ||
- "kedro-docker/**" | ||
pull_request: | ||
paths: | ||
- "kedro-docker/**" | ||
types: [ synchronize ] | ||
|
||
jobs: | ||
docker-test: | ||
uses: ./.github/workflows/check-plugin.yml | ||
with: | ||
plugin: kedro-docker |
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,16 @@ | ||
name: Run checks on kedro-telemetry | ||
|
||
on: | ||
push: | ||
paths: | ||
- "kedro-telemetry/**" | ||
pull_request: | ||
paths: | ||
- "kedro-telemetry/**" | ||
types: [ synchronize ] | ||
|
||
jobs: | ||
telemetry-test: | ||
uses: ./.github/workflows/check-plugin.yml | ||
with: | ||
plugin: kedro-telemetry |
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,33 @@ | ||
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart | ||
image: gitpod/workspace-python-3.10:2023-04-20-16-32-37 | ||
|
||
|
||
tasks: | ||
# We want packages installed during the pre-build init steps to go to /workspace | ||
# rather than ~ so that they are persisted. Gitpod sets PIP_USER=yes to ensure this, | ||
# but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use | ||
# pip install --user to install to /workspace. | ||
- name: kedro-plugins | ||
before: | | ||
echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no | ||
init: | | ||
make sign-off | ||
command: | | ||
pre-commit install --install-hooks | ||
clear | ||
github: | ||
prebuilds: | ||
# enable for the master/default branch (defaults to true) | ||
master: true | ||
# enable for all branches in this repo (defaults to false) | ||
branches: true | ||
# enable for pull requests coming from this repo (defaults to true) | ||
pullRequests: true | ||
# enable for pull requests coming from forks (defaults to false) | ||
pullRequestsFromForks: true | ||
# add a "Review in Gitpod" button as a comment to pull requests (defaults to true) | ||
addComment: false | ||
# add a "Review in Gitpod" button to pull requests (defaults to false) | ||
addBadge: 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
include README.md | ||
include LICENSE.md | ||
include requirements.txt | ||
include kedro_airflow/airflow_dag_template.j2 |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
-r requirements.txt | ||
apache-airflow<3.0 | ||
bandit>=1.6.2, <2.0 | ||
behave | ||
|
Oops, something went wrong.