Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: env.CODECOV_TOKEN != ''
Copy link

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition env.CODECOV_TOKEN != '' will not work as expected. The env context refers to environment variables set in the current step, but CODECOV_TOKEN is defined in the env block below this line. Use if: ${{ secrets.CODECOV_TOKEN }} instead, which will evaluate to true only when the secret exists and has a value.

Suggested change
if: env.CODECOV_TOKEN != ''
if: ${{ secrets.CODECOV_TOKEN }}

Copilot uses AI. Check for mistakes.

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,32 @@ uv run python -m mpzsql.cli \
--azure-storage-account "$AZURE_STORAGE_ACCOUNT" \
--azure-storage-container "$AZURE_STORAGE_CONTAINER"
```

## Development

### Running Tests

Tests can be run locally using:

```bash
uv run pytest tests/ -v
```

For coverage reporting:

```bash
uv run coverage run -m pytest tests/
uv run coverage report
uv run coverage xml
```

### Setting up Codecov (Optional)

If you want to enable code coverage reporting to Codecov in GitHub Actions, you need to:

1. Create a free account at [codecov.io](https://codecov.io)
2. Add your repository to Codecov
3. Get your repository's upload token from Codecov
4. Add the token as a repository secret named `CODECOV_TOKEN` in your GitHub repository settings

Without this token, the Codecov upload step will be skipped in the CI pipeline, but all tests will still run successfully.
Loading