do not run downstream test on main branch #179
Workflow file for this run
This file contains 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: [master] | |
tags: '*' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
julia-version: ['1'] | |
julia-arch: [x64] | |
os: [ubuntu-latest] | |
steps: | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: ${{ matrix.julia-version }} | |
- uses: julia-actions/cache@v1 | |
- uses: actions/checkout@v4 | |
- name: Install JuliaFormatter and format | |
run: | | |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' | |
julia -e 'using JuliaFormatter; format(["src", "test"], verbose=true)' | |
- name: Format check | |
run: | | |
julia -e ' | |
out = Cmd(`git diff --name-only`) |> read |> String | |
if out == "" | |
exit(0) | |
else | |
@error "Some files have not been formatted !!!" | |
write(stdout, out) | |
exit(1) | |
end' |