Skip to main content

GitHub Integration

Connect your GitHub repositories to TMS 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 TMS reporting in CI
  • Repository sync -- Browse code coverage and test case mappings from TMS

Connect GitHub to TMS​

Step 1: Open Integration Settings​

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

Step 2: Authorize TMS​

  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 TMS project
  3. Click Save

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

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

This creates a link visible in both places:

  • In TMS: The test case shows the commit under "Related Commits"
  • In GitHub: The commit links back to the TMS 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 TMS 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 TMS reporter
  3. TMS 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 TMS
  • Failed test names (in the details)

GitHub Actions​

Run your tests with TMS 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 }}
# The pytest plugin reads TMS_BASE_URL (defaults to https://tms.provalab.io)
TMS_BASE_URL: ${{ secrets.TMS_API_URL }}

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: pip install https://plugins.provalab.io/packages/pytest_tms_plugin-1.0.13-py3-none-any.whl
# Reporting is on by default once TMS_* is set (there is no --tms-enable).
# The pytest plugin has no environment flag; name the run instead.
- run: pytest --tms-test-run-name="ci #${{ github.run_number }}"

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.provalab.io (or your self-hosted URL)
TMS_API_KEYYour API key from auth.provalab.io/api-keys
TMS_ORGANIZATION_IDYour organization ID
TMS_PROJECT_IDYour project ID
Use organization-level secrets

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

Verify It Works​

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