Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Python Test

Run tests with coverage comparison against the main branch.

Downloads the main branch's coverage artifact, runs the current PR's tests, calculates the delta, and posts a formatted report on the PR.

Usage

Default (bash)

name: Integration
on:
  pull_request:
    branches: [main]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: elpic/actions/integration/python/test@v1

With setup-node

      - uses: elpic/actions/integration/python/test@v1
        with:
          setup: node
          node-version: '22'
          test-coverage-task: test:coverage

With just

      - uses: elpic/actions/integration/python/test@v1
        with:
          setup: just
          test-coverage-task: test:coverage

Inputs

Input Required Default Description
setup no bash Tool setup method -- bash, mise, node, just, or none
node-version no 20 Node.js version (used when setup=node)
test-coverage-task no test:coverage Task that runs tests with coverage (produces coverage.xml)
test-task no test Task that runs tests without coverage
timeout-minutes no 8 Step timeout

Notes

Your project needs a task named test:coverage that produces coverage.xml. Coverage from the main branch is downloaded via gh run download and compared against the current PR.