-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from JenspederM/ci/integration-test-on-call
Ci/integration test on call
- Loading branch information
Showing
10 changed files
with
1,415 additions
and
428 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,67 @@ | ||
name: Check Version | ||
description: "Check the version of the project and create a bump and changelog" | ||
inputs: | ||
github_token: | ||
description: "The GitHub token to use for authentication" | ||
required: true | ||
default: ${{ github.token }} | ||
push: | ||
description: "Whether to push the changes to the repository" | ||
required: false | ||
default: "false" | ||
pr_number: | ||
description: "The pull request number" | ||
required: false | ||
default: "" | ||
outputs: | ||
name: | ||
description: "The name of the project" | ||
value: ${{ steps.project.outputs.name }} | ||
old_version: | ||
description: "The old version of the project" | ||
value: ${{ steps.project.outputs.old_version }} | ||
new_version: | ||
description: "The new version of the project" | ||
value: ${{ steps.cz.outputs.version }} | ||
is_changed: | ||
description: "Whether the version has changed" | ||
value: ${{ steps.cz.outputs.version != steps.project.outputs.old_version }} | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ inputs.github_token }} | ||
fetch-depth: 0 | ||
- name: Set Name and Version from pyproject.toml to output | ||
id: project | ||
shell: bash | ||
run: | | ||
name=$(grep "^name" pyproject.toml -m 1 | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3 | tr "-" "_") | ||
version=$(grep "^version" pyproject.toml -m 1 | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3) | ||
echo "name=$name" >> $GITHUB_OUTPUT | ||
echo "old_version=$version" >> $GITHUB_OUTPUT | ||
echo "Releasing $name version $version" | ||
- name: Create bump and changelog | ||
id: cz | ||
uses: commitizen-tools/commitizen-action@master | ||
with: | ||
github_token: ${{ inputs.github_token }} | ||
changelog_increment_filename: body.md | ||
push: ${{ inputs.push }} | ||
- name: Find Comment | ||
if: ${{ inputs.pr_number != '' && steps.cz.outputs.version != steps.project.outputs.old_version }} | ||
uses: peter-evans/find-comment@v3 | ||
id: fc | ||
with: | ||
issue-number: ${{ inputs.pr_number }} | ||
comment-author: "github-actions[bot]" | ||
- name: Create bump comment | ||
if: ${{ inputs.pr_number != '' && steps.cz.outputs.version != steps.project.outputs.old_version }} | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
issue-number: ${{ inputs.pr_number }} | ||
body-file: body.md | ||
edit-mode: replace |
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 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,46 @@ | ||
name: Unit tests | ||
on: | ||
pull_request: {} | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
kedro_version: ["0.19.7", "0.19.8"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Sync kedro-databricks | ||
run: | | ||
uv sync --dev | ||
uv add "kedro==${{ matrix.kedro_version }}" | ||
- name: Lint kedro-databricks | ||
run: uv run ruff check | ||
- name: Test kedro-databricks | ||
run: uv run pytest tests/unit | ||
- name: Coverage comment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
with: | ||
github-token: ${{ github.token }} | ||
title: "Unit Test Coverage Report" | ||
pytest-xml-coverage-path: "coverage.xml" | ||
version: | ||
name: Check for changes and post bump comment | ||
runs-on: ubuntu-latest | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check Version | ||
uses: ./.github/actions/check_version | ||
with: | ||
github_token: ${{ github.token }} | ||
push: false | ||
pr_number: ${{ github.event.pull_request.number }} |
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,2 +1,3 @@ | ||
just 1.25.2 | ||
pre-commit 3.7.0 | ||
uv 0.5.13 |
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 |
---|---|---|
|
@@ -3,14 +3,23 @@ name = "kedro-databricks" | |
version = "0.6.7" | ||
description = "A plugin to run Kedro pipelines on Databricks." | ||
authors = [{ name = "Jens Peder Meldgaard", email = "[email protected]" }] | ||
readme = "README.md" | ||
requires-python = ">= 3.9" | ||
|
||
dependencies = [ | ||
"kedro>=0.19.8", | ||
"mergedeep>=1.3.4", | ||
"tomlkit>=0.13.0", | ||
"databricks-sdk>=0.36.0", | ||
] | ||
readme = "README.md" | ||
requires-python = ">= 3.9" | ||
[dependency-groups] | ||
dev = [ | ||
"pytest>=8.3.3", | ||
"pytest-cov>=6.0.0", | ||
"pre-commit>=4.0.1", | ||
"ruff>=0.7.2", | ||
"commitizen>=3.30.0", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/jenspederm/kedro-databricks" | ||
|
@@ -23,16 +32,6 @@ databricks = "kedro_databricks.plugin:commands" | |
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.rye] | ||
managed = true | ||
dev-dependencies = [ | ||
"pytest>=8.3.3", | ||
"pytest-cov>=6.0.0", | ||
"pre-commit>=4.0.1", | ||
"ruff>=0.7.2", | ||
"commitizen>=3.30.0", | ||
] | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
|
Oops, something went wrong.