Skip to main content

GitHub Integration

Connect your GitHub repositories to ProvaLab.io to link commits to test cases, show test results as PR status checks, and run TMS-integrated tests in GitHub Actions.

What You Can Do

  • Link commits to test cases -- Include [TMS-123] in commit messages to auto-link
  • PR status checks -- See test results directly on pull requests
  • GitHub Actions -- Run your test suite with ProvaLab.io reporting in CI
  • Repository sync -- Browse code coverage and test case mappings from ProvaLab.io

Connect GitHub to ProvaLab.io

Step 1: Open Integration Settings

  1. In ProvaLab.io, go to Settings > Integrations
  2. Find GitHub and click Connect

Step 2: Authorize ProvaLab.io

  1. You'll be redirected to GitHub's authorization page
  2. Select the organization and repositories to grant access to
  3. Click Authorize

Step 3: Select Repositories

After authorizing, choose which repositories to link:

  1. Select the repositories that contain your test code
  2. Map each repository to a ProvaLab.io project
  3. Click Save

Include [TMS-123] anywhere in your commit message to automatically link the commit to ProvaLab.io test case 123:

git commit -m "Fix login validation [TMS-101] [TMS-102]"

This creates a link visible in both places:

  • In ProvaLab.io: The test case shows the commit under "Related Commits"
  • In GitHub: The commit links back to the ProvaLab.io test case

Multiple test cases in one commit

git commit -m "Refactor auth module [TMS-101] [TMS-102] [TMS-103]"

In pull request descriptions

You can also reference test cases in PR descriptions:

## Changes
- Fixed login validation logic
- Updated error messages

## Test Cases
- [TMS-101] Login with valid credentials
- [TMS-102] Login with invalid password

PR Status Checks

When ProvaLab.io is connected to GitHub, test results appear as status checks on pull requests.

How it works

  1. A developer opens a PR
  2. GitHub Actions (or your CI) runs tests with the ProvaLab.io reporter
  3. ProvaLab.io receives the results and updates the PR status check
  4. The PR shows a green check (all passed) or red X (failures)

Setup

  1. Go to Settings > Integrations > GitHub
  2. Under Status Checks, toggle Enable PR status checks
  3. Select which test runs should report to PRs:
    • All test runs triggered from the repository
    • Only CI test runs (triggered via GitHub Actions)
    • Specific test plans only

What the check shows

The status check includes:

  • Total tests run
  • Pass/fail/skip counts
  • Link to the full test run in ProvaLab.io
  • Failed test names (in the details)

GitHub Actions

Run your tests with ProvaLab.io reporting in GitHub Actions. Here's a complete workflow example:

Playwright Example

.github/workflows/tests.yml
name: Run Tests

on:
push:
branches: [main, develop]
pull_request:
branches: [main]

env:
TMS_API_URL: ${{ secrets.TMS_API_URL }}
TMS_API_KEY: ${{ secrets.TMS_API_KEY }}
TMS_ORGANIZATION_ID: ${{ secrets.TMS_ORGANIZATION_ID }}
TMS_PROJECT_ID: ${{ secrets.TMS_PROJECT_ID }}
TMS_ENVIRONMENT: ci

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: npx playwright test

- name: Upload test report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

Jest Example

.github/workflows/tests.yml
name: Run Tests

on:
push:
branches: [main]
pull_request:

env:
TMS_API_URL: ${{ secrets.TMS_API_URL }}
TMS_API_KEY: ${{ secrets.TMS_API_KEY }}
TMS_ORGANIZATION_ID: ${{ secrets.TMS_ORGANIZATION_ID }}
TMS_PROJECT_ID: ${{ secrets.TMS_PROJECT_ID }}
TMS_ENVIRONMENT: ci

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npx jest --ci

pytest Example

.github/workflows/tests.yml
name: Run Tests

on:
push:
branches: [main]
pull_request:

env:
TMS_API_URL: ${{ secrets.TMS_API_URL }}
TMS_API_KEY: ${{ secrets.TMS_API_KEY }}
TMS_ORGANIZATION_ID: ${{ secrets.TMS_ORGANIZATION_ID }}
TMS_PROJECT_ID: ${{ secrets.TMS_PROJECT_ID }}

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -r requirements.txt
- run: pytest --tms-enable --tms-environment=ci

Setting up GitHub Secrets

  1. Go to your GitHub repository
  2. Click Settings > Secrets and variables > Actions
  3. Add these secrets:
SecretValue
TMS_API_URLhttps://tms.yourcompany.com
TMS_API_KEYYour API key from ProvaLab.io Settings
TMS_ORGANIZATION_IDYour organization ID
TMS_PROJECT_IDYour project ID
Use organization-level secrets

If you have multiple repositories, add ProvaLab.io secrets at the GitHub organization level so all repos can use them.

Verify It Works

  1. Connect GitHub from Settings > Integrations
  2. Add ProvaLab.io secrets to your GitHub repository
  3. Create a commit with [TMS-1] in the message
  4. Push and verify the link appears in ProvaLab.io
  5. Open a PR and verify the status check appears
Common issues
  • Status check not appearing: Make sure PR status checks are enabled in ProvaLab.io integration settings
  • Commit links not working: Verify the format is [TMS-123] (with brackets and dash)
  • GitHub Actions failing: Check that all four ProvaLab.io secrets are configured in your repository settings