Skip to content

GitHub Actions

Official action

The simplest setup — no install step required:

yaml
name: PropWatch
on:
  pull_request:
    branches: [main]

jobs:
  propwatch:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: steve228uk/propwatch@v1
        with:
          base-ref: origin/${{ github.base_ref }}

With annotations and JUnit report

yaml
name: PropWatch
on:
  pull_request:
    branches: [main, develop]

jobs:
  propwatch:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: steve228uk/propwatch@v1
        with:
          base-ref: origin/${{ github.base_ref }}
          reporters: console,junit,github
          output-dir: ./test-reports
          exit-on-breaking: true
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Upload report
        uses: actions/upload-artifact@v4
        if: always()
        with:
          name: propwatch-report
          path: ./test-reports/

The github reporter adds inline annotations to the diff and posts a Markdown summary to the PR.

Action inputs

InputDescriptionDefault
base-refBase ref to compareorigin/main
config-pathPath to config fileAuto-detected
reportersComma-separated listconsole,junit
output-dirOutput directory for reports./test-reports
exit-on-breakingFail the step on breaking changesfalse
report-formatMonorepo format: aggregate, per-package, bothboth
github-tokenGitHub token for PR annotations

Action outputs

OutputDescription
has-breaking-changes"true" if breaking changes were detected
breaking-countNumber of breaking changes
added-countNumber of added IDs
report-pathPath to the generated reports directory

Monorepo

yaml
- uses: steve228uk/propwatch@v1
  with:
    base-ref: origin/${{ github.base_ref }}
    packages: true
    format: both

Matrix build per package

yaml
jobs:
  propwatch:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        package: [web, mobile, api]
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: steve228uk/propwatch@v1
        with:
          base-ref: origin/${{ github.base_ref }}
          config-path: ./packages/${{ matrix.package }}/propwatch.config.json

Using npx directly

yaml
steps:
  - uses: actions/checkout@v4
    with:
      fetch-depth: 0

  - run: npx propwatch --base origin/${{ github.base_ref }} --reporter junit --output test-reports/

  - uses: actions/upload-artifact@v4
    if: always()
    with:
      name: propwatch-report
      path: test-reports/

Released under the MIT License