Skip to content

Commit b1908b6

Browse files
Update CI.yml
1 parent e987a99 commit b1908b6

File tree

1 file changed

+46
-4
lines changed

1 file changed

+46
-4
lines changed

.github/workflows/CI.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,67 @@ name: CI
22
on:
33
pull_request:
44
branches:
5-
- main
5+
- master
6+
- 'release-'
67
paths-ignore:
78
- 'docs/**'
89
push:
910
branches:
10-
- main
11+
- master
1112
paths-ignore:
1213
- 'docs/**'
14+
15+
concurrency:
16+
# Skip intermediate builds: always, but for the master branch.
17+
# Cancel intermediate builds: always, but for the master branch.
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
20+
1321
jobs:
22+
formatter:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
matrix:
26+
julia-version: [1]
27+
julia-arch: [x86]
28+
os: [ubuntu-latest]
29+
steps:
30+
- uses: julia-actions/setup-julia@latest
31+
with:
32+
version: ${{ matrix.julia-version }}
33+
34+
- uses: actions/checkout@v4
35+
- name: Install JuliaFormatter and format
36+
# This will use the latest version by default but you can set the version like so:
37+
#
38+
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
39+
run: |
40+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="1.0.50"))'
41+
julia -e 'using JuliaFormatter; format(".", verbose=true)'
42+
- name: Format check
43+
run: |
44+
julia -e '
45+
out = Cmd(`git diff`) |> read |> String
46+
if out == ""
47+
exit(0)
48+
else
49+
@error "Some files have not been formatted !!!"
50+
write(stdout, out)
51+
exit(1)
52+
end'
1453
test:
1554
runs-on: ubuntu-latest
1655
strategy:
56+
fail-fast: false
1757
matrix:
18-
GROUP:
58+
group:
1959
- QA
2060
- Core
2161
version:
2262
- '1'
2363
steps:
2464
- uses: actions/checkout@v4
25-
- uses: julia-actions/setup-julia@v2
65+
- uses: julia-actions/setup-julia@v1
2666
with:
2767
version: ${{ matrix.version }}
2868
- uses: actions/cache@v4
@@ -37,6 +77,8 @@ jobs:
3777
${{ runner.os }}-
3878
- uses: julia-actions/julia-buildpkg@v1
3979
- uses: julia-actions/julia-runtest@v1
80+
env:
81+
GROUP: ${{ matrix.group }}
4082
- uses: julia-actions/julia-processcoverage@v1
4183
- uses: codecov/codecov-action@v4
4284
with:

0 commit comments

Comments
 (0)