diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..dd21942 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,31 @@ +name: Codecov +on: + pull_request: + paths: + - 'my_pkg/**' # todo: change my_pkg to the name of the package + - 'tests/**' + - '.github/workflows/codecov.yml' + push: + branches: + - main + workflow_dispatch: +jobs: + upload-coverage-report: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: pipx install poetry + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: poetry + + - run: poetry install + - run: poetry run pytest --cov=pandas_pyarrow --cov-report=xml + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + continue-on-error: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd7b7df..d02b708 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,8 +13,3 @@ repos: args: [ --preview, --config=pyproject.toml ] - id: ruff args: [ --preview, --fix,--unsafe-fixes, --config=pyproject.toml ] - - - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.5.13 - hooks: - - id: uv-lock diff --git a/Makefile b/Makefile index a068277..a421bf0 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ check: uv run pre-commit run --all-files coverage: - uv run pytest --cov=ml_orchestrator --cov-report=xml + uv run pytest --cov=my_pkg --cov-report=xml --junitxml=junit.xml -o junit_family=legacy + # todo: change my_pkg to the name of the package mypy: - uv tool run mypy . --config-file pyproject.toml + uv tool run mypy my_pkg --config-file pyproject.toml # todo: change my_pkg to the name of the package