chore: use pixi to manage the format tools and format the world (#330) #781
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: format | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| issues: write | |
| jobs: | |
| check-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.3 | |
| with: | |
| pixi-version: v0.61.0 | |
| environments: format | |
| activate-environment: true | |
| cache: true | |
| locked: true | |
| - name: Run formatter | |
| run: pixi run format | |
| continue-on-error: true | |
| - name: Auto correct | |
| uses: huacnlee/autocorrect-action@v2 | |
| with: | |
| args: --lint ./docs | |
| continue-on-error: true | |
| - name: Suggest changes | |
| if: github.event_name == 'pull_request' | |
| uses: reviewdog/action-suggester@v1.24.0 | |
| with: | |
| tool_name: "fmt" | |
| fail_level: any | |
| filter_mode: nofilter |