[FXC-4753] Shortcuts in GUI #59
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: Spellchecker | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| spellcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install poetry | |
| run: pipx install codespell | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Check spelling | |
| id: spellcheck | |
| continue-on-error: true | |
| run: uvx codespell > spellcheck.txt | |
| - name: Prepare spellcheck comment body | |
| id: prepare_comment | |
| if: > | |
| hashFiles('spellcheck.txt') != '' | |
| run: | | |
| echo "<!-- lint-notebooks-spellcheck-comment -->" > comment_body.txt | |
| echo "" >> comment_body.txt | |
| cat spellcheck.txt >> comment_body.txt | |
| echo "Generated by GitHub Action run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> comment_body.txt | |
| - name: Find existing comment | |
| uses: peter-evans/find-comment@v3 | |
| id: find_comment | |
| if: steps.prepare_comment.outcome == 'success' | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: 'github-actions[bot]' | |
| body-includes: '<!-- lint-notebooks-spellcheck-comment -->' | |
| - name: Post or Update spell check comment | |
| if: steps.prepare_comment.outcome == 'success' | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| repository: ${{ github.repository }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-id: ${{ steps.find_comment.outputs.comment-id }} | |
| body-path: comment_body.txt | |
| edit-mode: replace | |
| - name: Determine success on spellchecking errors | |
| if: steps.spellcheck.outcome != 'success' | |
| uses: actions/github-script@v3 | |
| with: | |
| script: | | |
| core.setFailed('Found issues with spelling') |