Linting and testing indexer for trr_azr_trust_mod on PR creation/modification #79
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint and test indexer parsing | |
| run-name: Linting and testing indexer for ${{ github.head_ref }} on PR creation/modification | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| lint_and_test_index: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| - name: Get list of report markdown files changed in PR | |
| id: changed-markdown-files | |
| uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 | |
| with: | |
| files: "reports/**/README.md" | |
| - name: Setup Go environment | |
| uses: actions/setup-go@v5.5.0 | |
| with: | |
| go-version: '1.21' | |
| - name: Install dependencies | |
| run: go get github.com/yuin/goldmark | |
| - name: Run linter on changed files | |
| if: steps.changed-markdown-files.outputs.any_changed == 'true' | |
| run: go run tools/trrlint/main.go ${{ steps.changed-markdown-files.outputs.all_changed_files }} | |
| - name: Run linter on all files | |
| if: github.event_name == 'workflow_dispatch' | |
| run: go run tools/trrlint/main.go | |
| - name: Validate indexer would pass | |
| if: steps.changed-markdown-files.outputs.all_any_changed == 'true' | |
| run: python3 tools/index/index.py merge -f ${{ steps.changed-markdown-files.outputs.all_all_changed_files }} |