Overhaul of Algebraic Statistics #8775
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: JuliaFormatter test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 'release-*' | |
| paths-ignore: | |
| - '*.md' | |
| - '.github/workflows/changelog.yml' | |
| - 'dev/releases/release_notes.py' | |
| pull_request: | |
| paths-ignore: | |
| - '*.md' | |
| - '.github/workflows/changelog.yml' | |
| - 'dev/releases/release_notes.py' | |
| workflow_dispatch: | |
| concurrency: | |
| # group by workflow and ref; the last slightly strange component ensures that for pull | |
| # requests, we limit to 1 concurrent job, but for the master branch we don't | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} | |
| # Cancel intermediate builds, but only if it is a pull request build. | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| jobs: | |
| check-consistent-formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: julia-actions/setup-julia@v2 | |
| - uses: julia-actions/cache@v2 | |
| - name: 'Check format with JuliaFormatter' | |
| run: | | |
| julia etc/format_code.jl | |
| git status # to see which files changed | |
| if ! git diff-index --quiet HEAD; then | |
| echo "+------------------------------------------------------------------" | |
| echo "| Error, detected files which are not properly formatted!" | |
| echo "| Please run 'julia etc/format_code.jl' on your code and try again." | |
| echo "+------------------------------------------------------------------" | |
| exit 1 | |
| fi | |
| shell: bash |