-
Notifications
You must be signed in to change notification settings - Fork 48
38 lines (38 loc) · 1.17 KB
/
style.yml
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
34
35
36
37
38
name: Style-Enforcer
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- 'main'
tags: '*'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# note: keep in sync with `format/run.jl`
paths-ignore:
- 'README.md'
- '.gitignore'
jobs:
format-check:
name: Style Enforcement (Julia ${{ matrix.julia-version }} - ${{ github.event_name }})
# Run on push's or non-draft PRs
if: (github.event_name == 'push') || (github.event.pull_request.draft == false)
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: [1.6]
steps:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- uses: actions/checkout@v1
- name: Instantiate `format` environment and format
run: |
julia --project=format -e 'using Pkg; Pkg.instantiate()'
julia --project=format 'format/run.jl'
- uses: reviewdog/action-suggester@v1
if: github.event_name == 'pull_request'
with:
tool_name: JuliaFormatter
fail_on_error: true