Skip to content

ci: harden and improve GitHub Actions workflows#67

Merged
PabloPardoGarcia merged 2 commits intomainfrom
improve-github-workflows
Mar 26, 2026
Merged

ci: harden and improve GitHub Actions workflows#67
PabloPardoGarcia merged 2 commits intomainfrom
improve-github-workflows

Conversation

@PabloPardoGarcia
Copy link
Copy Markdown
Member

Security:

  • Pin all third-party actions to immutable commit SHAs
  • Add permissions: {} at workflow level with explicit per-job grants
  • Migrate PyPI publishing to OIDC trusted publishing (remove PYPI_API_TOKEN)

Correctness:

  • Fix version-bump to read base version from main, preventing double-bumps when labels change mid-PR
  • Fix label evaluation to check all PR labels (not just triggering event) and pick highest impact (major > minor > patch)
  • Reverse tag/publish order in release: tag first, then publish to PyPI
  • Add VERSION format validation before arithmetic in version-bump
  • Add twine check before PyPI upload

Reliability:

  • Add concurrency groups to all workflows (cancel-in-progress where safe)
  • Move coverage badge commit to dedicated post-matrix job to eliminate race condition with parallel matrix runners
  • Eliminate duplicate pytest run on Python 3.13 (single pass with all reports)
  • Fix shell injection vectors: pass GitHub context via env: not inline

New:

  • Add smoke.yml: fast test run on every push to main to catch merge-induced regressions before the next release

Security:
- Pin all third-party actions to immutable commit SHAs
- Add permissions: {} at workflow level with explicit per-job grants
- Migrate PyPI publishing to OIDC trusted publishing (remove PYPI_API_TOKEN)

Correctness:
- Fix version-bump to read base version from main, preventing double-bumps
  when labels change mid-PR
- Fix label evaluation to check all PR labels (not just triggering event)
  and pick highest impact (major > minor > patch)
- Reverse tag/publish order in release: tag first, then publish to PyPI
- Add VERSION format validation before arithmetic in version-bump
- Add twine check before PyPI upload

Reliability:
- Add concurrency groups to all workflows (cancel-in-progress where safe)
- Move coverage badge commit to dedicated post-matrix job to eliminate
  race condition with parallel matrix runners
- Eliminate duplicate pytest run on Python 3.13 (single pass with all reports)
- Fix shell injection vectors: pass GitHub context via env: not inline

New:
- Add smoke.yml: fast test run on every push to main to catch
  merge-induced regressions before the next release

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
etl
   __init__.py50100% 
   api_client.py64592%70–73, 123
   client.py39489%59–61, 141
   dlq.py41197%70
   errors.py280100% 
   pipeline.py146795%334–337, 350, 406–407
   tracking.py260100% 
   utils.py11110%1, 3, 6, 8–11, 17–18, 22, 28
etl/models
   __init__.py120100% 
   base.py10460%7–10
   config.py34682%30–35
   data_types.py800100% 
   filter.py15193%16
   join.py49197%44
   metadata.py40100% 
   pipeline.py116793%160, 186, 189, 221–224
   resources.py1203769%31, 72–78, 88–95, 125–132, 142, 144–150, 167, 169, 172–174
   schema.py260100% 
   sink.py59689%33, 39, 47, 49, 53, 55
   source.py130695%47, 51, 68, 81, 127, 153
   stateless_transformation.py44784%44, 48, 52, 57, 69, 71, 73
TOTAL105910390% 

@PabloPardoGarcia PabloPardoGarcia merged commit f61e2ce into main Mar 26, 2026
@PabloPardoGarcia PabloPardoGarcia deleted the improve-github-workflows branch March 26, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants