Skip to content

Commit 6e75f71

Browse files
authored
Update CI workflows (#170)
1 parent 0bb2b17 commit 6e75f71

File tree

3 files changed

+50
-51
lines changed

3 files changed

+50
-51
lines changed

.github/workflows/Benchmark.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,10 @@ jobs:
99
if: contains(github.event.pull_request.labels.*.name, 'run benchmark')
1010
steps:
1111
- uses: actions/checkout@v4
12-
- uses: julia-actions/setup-julia@latest
13-
- name: Cache artifacts
14-
uses: actions/cache@v4
15-
env:
16-
cache-name: cache-artifacts
12+
- uses: julia-actions/setup-julia@v2
1713
with:
18-
path: ~/.julia/artifacts
19-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
20-
restore-keys: |
21-
${{ runner.os }}-test-${{ env.cache-name }}-
22-
${{ runner.os }}-test-
23-
${{ runner.os }}-
14+
version: '1'
15+
- uses: julia-actions/cache@v2
2416
- name: Install dependencies
2517
run: julia -e 'using Pkg; pkg"add JSON PkgBenchmark [email protected]"'
2618
- name: Run benchmarks

.github/workflows/CompatHelper.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name: CompatHelper
22
on:
33
schedule:
4-
- cron: 0 0 * * *
4+
- cron: '0 0 * * *' # Every day at midnight
55
workflow_dispatch:
66
jobs:
77
CompatHelper:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
911
steps:
1012
- name: Pkg.add("CompatHelper")
1113
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'

.github/workflows/ci.yml

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,76 @@
11
name: CI
22
on:
3-
pull_request:
4-
branches:
5-
- master
63
push:
74
branches:
85
- master
9-
tags: '*'
6+
tags: ['*']
7+
pull_request:
8+
workflow_dispatch:
9+
1010
jobs:
11+
1112
test:
12-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13-
runs-on: ${{ matrix.os }}
13+
name: Julia ${{ matrix.version }}
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 60
16+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
17+
actions: write
18+
contents: read
1419
strategy:
1520
fail-fast: false
1621
matrix:
1722
version:
18-
- '1.6'
23+
- 'lts'
1924
- '1'
20-
- 'nightly'
21-
os:
22-
- ubuntu-latest
23-
arch:
24-
- x64
25+
# - 'pre' # TODO: tests on pre-release version
2526
steps:
2627
- uses: actions/checkout@v4
27-
- uses: julia-actions/setup-julia@v1
28+
- uses: julia-actions/setup-julia@v2
2829
with:
2930
version: ${{ matrix.version }}
30-
arch: ${{ matrix.arch }}
31-
- uses: actions/cache@v4
32-
env:
33-
cache-name: cache-artifacts
34-
with:
35-
path: ~/.julia/artifacts
36-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
37-
restore-keys: |
38-
${{ runner.os }}-test-${{ env.cache-name }}-
39-
${{ runner.os }}-test-
40-
${{ runner.os }}-
31+
arch: x64
32+
- uses: julia-actions/cache@v2
4133
- uses: julia-actions/julia-buildpkg@v1
42-
continue-on-error: ${{ matrix.version == 'nightly' }}
4334
- uses: julia-actions/julia-runtest@v1
44-
continue-on-error: ${{ matrix.version == 'nightly' }}
4535
- uses: julia-actions/julia-processcoverage@v1
36+
with:
37+
directories: src,ext,test,benchmark
4638
- uses: codecov/codecov-action@v4
4739
with:
48-
file: lcov.info
40+
files: lcov.info
41+
token: ${{ secrets.CODECOV_TOKEN }}
42+
slug: Julia-XAI/ExplainableAI.jl
43+
4944
docs:
5045
name: Documentation
5146
runs-on: ubuntu-latest
47+
permissions:
48+
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
49+
contents: write
50+
statuses: write
5251
steps:
5352
- uses: actions/checkout@v4
54-
- uses: julia-actions/setup-julia@v1
53+
- uses: julia-actions/setup-julia@v2
5554
with:
5655
version: '1'
57-
- run: |
58-
julia --project=docs -e '
59-
using Pkg
60-
Pkg.develop(PackageSpec(path=pwd()))
61-
Pkg.instantiate()'
62-
- run: |
63-
julia --project=docs -e '
64-
using Documenter: doctest
65-
using ExplainableAI
66-
doctest(ExplainableAI)'
67-
- run: julia --project=docs docs/make.jl
56+
- uses: julia-actions/cache@v2
57+
- name: Configure doc environment
58+
shell: julia --project=docs --color=yes {0}
59+
run: |
60+
using Pkg
61+
Pkg.Registry.update()
62+
Pkg.develop(PackageSpec(path=pwd()))
63+
Pkg.instantiate()
64+
65+
- uses: julia-actions/julia-buildpkg@v1
66+
- uses: julia-actions/julia-docdeploy@v1
6867
env:
6968
DATADEPS_ALWAYS_ACCEPT: true # for MLDatasets download
7069
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7170
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
71+
- name: Run doctests
72+
run: |
73+
julia --project=docs --color=yes -e '
74+
using Documenter: doctest
75+
using ExplainableAI
76+
doctest(ExplainableAI)'

0 commit comments

Comments
 (0)