chore: mise run migrate_hash (seems atlas 1.0.0 has different order…
#595
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: generated | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| atlas: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jdx/mise-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Hash migrations | |
| run: mise run migrate_hash | |
| - name: Make sure all changes generated | |
| run: echo 'ci_migration' | mise run migrate_diff | |
| - name: Tidy | |
| run: go mod tidy | |
| - name: Ensure freshly generated hashes match committed ones | |
| run: | | |
| if ! git diff --exit-code; then | |
| echo "Error: Generating migration hashes again produced output that doesn't match those committed to the repo." | |
| echo "Run 'mise run migrate_hash' and commit the changes." | |
| exit 1 | |
| fi | |
| go: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jdx/mise-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Run generation tasks | |
| run: mise run generate | |
| - name: Tidy | |
| run: go mod tidy | |
| - name: Ensure freshly generated code matches committed code | |
| run: | | |
| if ! git diff --exit-code; then | |
| echo "Error: Regenerating the generated code produced output that doesn't match the code committed to the repo." | |
| echo "Run 'mise run generate' and commit the changes." | |
| exit 1 | |
| fi |