2.0 migration guide + new specs #55
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: PR checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master, main, 'v?[0-9]+.[0-9]+'] | |
| jobs: | |
| linting: | |
| name: Check Yamllint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install deps | |
| run: | | |
| pip install yamllint yamlfix | |
| - name: Add yamllint annotator | |
| uses: pr-annotators/yamllint-pr-annotator@v1.0.0 | |
| - name: Run yamllint | |
| run: |- | |
| yamllint -f parsable TranslatorReasonerAPI.yaml | |
| format_check: | |
| name: Check Yamlfix | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install deps | |
| run: | | |
| pip install yamllint yamlfix | |
| - name: Run yamlfix | |
| run: |- | |
| yamlfix TranslatorReasonerAPI.yaml | |
| - name: Verify no format changes | |
| uses: tj-actions/verify-changed-files@v20.0.4 | |
| id: verify-changed-files | |
| with: | |
| files: | | |
| TranslatorReasonerAPI.yaml | |
| - name: Log diff after yamlfix | |
| if: steps.verify-changed-files.outputs.files_changed == 'true' | |
| run: |- | |
| git diff --unified=0 TranslatorReasonerAPI.yaml | |
| echo '::error::Yamlfix would make changes, see logs for details.' | |
| exit 1 |