Merge pull request #193 from phobson/unified-publish-workflow #67
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
name: Run coverage via codecov | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Check Code Coverage | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Generate coverage report | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install uv | |
uv venv | |
source .venv/bin/activate | |
uv pip install pytest flake8 | |
if [ -f requirements_dev.txt ]; then uv pip install -r requirements_dev.txt; fi | |
coverage run --source wqio check_wqio.py --doctest-modules --cov --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
run: | | |
# Replace `linux` below with the appropriate OS | |
# Options are `alpine`, `linux`, `macos`, `windows` | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
chmod +x codecov | |
./codecov -t ${{ secrets.CODECOV_TOKEN }} |