Skip to content

Ci/integration test on call #25

Ci/integration test on call

Ci/integration test on call #25

Workflow file for this run

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"
- name: Check Version
uses: ./.github/actions/check_version
id: check_version
with:
github_token: ${{ github.token }}
push: false
pr_number: ${{ github.event.pull_request.number }}
# - name: Set Name and Version from pyproject.toml to output
# id: project
# 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 "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: ${{ github.token }}
# changelog_increment_filename: body.md
# dry_run: true
# push: false
# - name: Find Comment
# if: steps.check_version.outputs.is_changed == 'true'
# uses: peter-evans/find-comment@v3
# id: fc
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: "github-actions[bot]"
# - name: Create bump comment
# if: steps.check_version.outputs.is_changed == 'true'
# uses: peter-evans/create-or-update-comment@v4
# with:
# comment-id: ${{ steps.fc.outputs.comment-id }}
# issue-number: ${{ github.event.pull_request.number }}
# body-file: body.md
# edit-mode: replace