Skip to content

Commit 8c93b06

Browse files
authored
[CI] Update GitHub Actions setup (#38)
1 parent c090626 commit 8c93b06

File tree

4 files changed

+70
-18
lines changed

4 files changed

+70
-18
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"

.github/workflows/CompatHelper.yml

+36-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,48 @@
11
name: CompatHelper
2+
23
on:
34
schedule:
45
- cron: 0 0 * * *
56
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
612
jobs:
713
CompatHelper:
814
runs-on: ubuntu-latest
915
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
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
22+
with:
23+
version: '1'
24+
arch: ${{ runner.arch }}
25+
if: steps.julia_in_path.outcome != 'success'
26+
- uses: julia-actions/cache@v2
27+
- name: "Add the General registry via Git"
28+
run: |
29+
import Pkg
30+
ENV["JULIA_PKG_SERVER"] = ""
31+
Pkg.Registry.add("General")
32+
shell: julia --color=yes {0}
33+
- name: "Install CompatHelper"
34+
run: |
35+
import Pkg
36+
name = "CompatHelper"
37+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
38+
version = "3"
39+
Pkg.add(; name, uuid, version)
40+
shell: julia --color=yes {0}
41+
- name: "Run CompatHelper"
42+
run: |
43+
import CompatHelper
44+
CompatHelper.main()
45+
shell: julia --color=yes {0}
1346
env:
1447
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1548
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

+19
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
name: TagBot
2+
23
on:
34
issue_comment:
45
types:
56
- created
67
workflow_dispatch:
8+
inputs:
9+
lookback:
10+
default: "3"
11+
12+
permissions:
13+
actions: read
14+
checks: read
15+
contents: write
16+
deployments: read
17+
issues: read
18+
discussions: read
19+
packages: read
20+
pages: read
21+
pull-requests: read
22+
repository-projects: read
23+
security-events: read
24+
statuses: read
25+
726
jobs:
827
TagBot:
928
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'

.github/workflows/ci.yml

+8-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: CI
2+
23
on:
34
pull_request:
45
branches:
@@ -7,11 +8,13 @@ on:
78
branches:
89
- master
910
tags: '*'
11+
1012
concurrency:
1113
# Skip intermediate builds: all builds except for builds on the `master` or `release-*` branches
1214
# Cancel intermediate builds: only pull request builds
1315
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }}
1416
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
17+
1518
jobs:
1619
test:
1720
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -35,25 +38,16 @@ jobs:
3538
- os: macOS-latest
3639
arch: x86
3740
steps:
38-
- uses: actions/checkout@v2
39-
- uses: julia-actions/setup-julia@v1
41+
- uses: actions/checkout@v4
42+
- uses: julia-actions/setup-julia@v2
4043
with:
4144
version: ${{ matrix.version }}
4245
arch: ${{ matrix.arch }}
43-
- uses: actions/cache@v1
44-
env:
45-
cache-name: cache-artifacts
46-
with:
47-
path: ~/.julia/artifacts
48-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
49-
restore-keys: |
50-
${{ runner.os }}-test-${{ env.cache-name }}-
51-
${{ runner.os }}-test-${{ matrix.os }}
52-
${{ runner.os }}-
46+
- uses: julia-actions/cache@v2
5347
- run: julia --color=yes .ci/test_and_change_uuid.jl
5448
- uses: julia-actions/julia-buildpkg@v1
5549
- uses: julia-actions/julia-runtest@v1
5650
- uses: julia-actions/julia-processcoverage@v1
57-
- uses: codecov/codecov-action@v1
51+
- uses: codecov/codecov-action@v5
5852
with:
59-
file: lcov.info
53+
files: lcov.info

0 commit comments

Comments
 (0)