name: Dogfood Census Action

on:
  push:
    branches: [main]
    paths: [action.yml]
  pull_request:
    paths: [action.yml]

jobs:
  dogfood:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v4

      - name: Install Census locally
        run: pip install -e .

      - name: Create test manifest
        run: census scan ./src --dry-run --manifest test-dogfood.db

      - name: Run action (integrity)
        uses: ./
        with:
          command: integrity
          manifest: test-dogfood.db
