@@ -2,25 +2,45 @@ name: CompatHelper
2
2
3
3
on :
4
4
schedule :
5
- - cron : ' 00 * * * *'
6
- issues :
7
- types : [opened, reopened]
5
+ - cron : 0 0 * * *
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ contents : write
10
+ pull-requests : write
8
11
9
12
jobs :
10
- build :
11
- runs-on : ${{ matrix.os }}
12
- strategy :
13
- matrix :
14
- julia-version : [1]
15
- julia-arch : [x86]
16
- os : [ubuntu-latest]
13
+ CompatHelper :
14
+ runs-on : ubuntu-latest
17
15
steps :
18
- - uses : julia-actions/setup-julia@latest
16
+ - name : Check if Julia is already available in the PATH
17
+ id : julia_in_path
18
+ run : which julia
19
+ continue-on-error : true
20
+ - name : Install Julia, but only if it is not already available in the PATH
21
+ uses : julia-actions/setup-julia@v2
19
22
with :
20
- version : ${{ matrix.julia-version }}
21
- - name : Pkg.add("CompatHelper")
22
- run : julia -e 'using Pkg; Pkg.add("CompatHelper")'
23
- - name : CompatHelper.main()
23
+ version : ' 1'
24
+ arch : ${{ runner.arch }}
25
+ if : steps.julia_in_path.outcome != 'success'
26
+ - name : " Add the General registry via Git"
27
+ run : |
28
+ import Pkg
29
+ ENV["JULIA_PKG_SERVER"] = ""
30
+ Pkg.Registry.add("General")
31
+ shell : julia --color=yes {0}
32
+ - name : " Install CompatHelper"
33
+ run : |
34
+ import Pkg
35
+ name = "CompatHelper"
36
+ uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
37
+ version = "3"
38
+ Pkg.add(; name, uuid, version)
39
+ shell : julia --color=yes {0}
40
+ - name : " Run CompatHelper"
41
+ run : |
42
+ import CompatHelper
43
+ CompatHelper.main(; subdirs=["", "docs", "test/downstream", "lib"])
44
+ shell : julia --color=yes {0}
24
45
env :
25
46
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
- run : julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs", "test/downstream", "lib"])'
0 commit comments