Publish TwinDuel team membership #3
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: Validate bot submission | |
| on: | |
| pull_request: | |
| paths: | |
| - bots/** | |
| - scripts/** | |
| - .github/workflows/validate.yml | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - run: python -m unittest discover -s tests -v | |
| - name: Reject hand-edited generated catalog files | |
| run: | | |
| if git cat-file -e origin/${{ github.base_ref }}:bots/index.json 2>/dev/null && git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -qx 'bots/index.json'; then | |
| echo 'bots/index.json is generated by CI and cannot be edited in a pull request.' | |
| exit 1 | |
| fi | |
| if git cat-file -e origin/${{ github.base_ref }}:bots/owners.json 2>/dev/null && git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -qx 'bots/owners.json'; then | |
| echo 'bots/owners.json is generated by CI and cannot be edited in a pull request.' | |
| exit 1 | |
| fi | |
| - run: python scripts/validate_bot.py --root . --owner '${{ github.event.pull_request.user.login }}' --smoke |