-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (33 loc) · 933 Bytes
/
check-formatting.yml
File metadata and controls
34 lines (33 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: tests
on:
push:
branches:
- trunk
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
check-formatting:
name: JuliaFormatter
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
actions: write
contents: read
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: 'lts'
arch: x64
- uses: julia-actions/cache@v3
- name: Install JuliaFormatter and check format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; isok = format("."); if isok exit(0) else exit(1) end'