name: Decapod Validate

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

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Bazel
        uses: bazel-contrib/setup-bazel@0.13.0
        with:
          bazelisk-cache: true
          disk-cache: decapod-validate
          repository-cache: true
      - name: Decapod Validate
        env:
          DECAPOD_VALIDATE_SKIP_GIT_GATES: 1
        run: |
          bazel run //:decapod -- init --proof
          bazel run //:decapod -- validate
