1
1
name : CI
2
-
3
2
on :
4
3
push :
5
4
branches :
6
5
- master
7
6
tags : ' *'
8
7
pull_request :
9
-
10
- defaults :
11
- run :
12
- shell : bash
13
-
8
+ workflow_dispatch :
9
+ concurrency :
10
+ # Skip intermediate builds: always.
11
+ # Cancel intermediate builds: only if it is a pull request build.
12
+ group : ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress : ${{ startsWith(github.ref, 'refs/pull/') }}
14
14
jobs :
15
15
test :
16
- name : Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.julia-threads }} thread(s) - ${{ github.event_name }}
16
+ name : Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.julia-threads }} thread(s) - ${{ github.event_name }}
17
17
runs-on : ${{ matrix.os }}
18
+ permissions : # needed to allow julia-actions/cache to proactively delete old caches that it has created
19
+ actions : write
20
+ contents : read
18
21
env :
19
22
JULIA_NUM_THREADS : ${{ matrix.julia-threads }}
20
23
JL_TRF_TEST_TKR : ${{ matrix.test-hgf-tkr }}
24
27
matrix :
25
28
version :
26
29
- ' 1.10' # Replace this with the minimum Julia version that your package supports.
30
+ - ' 1.11'
27
31
# - '1' # automatically expands to the latest stable 1.x release of Julia
28
32
# - 'nightly'
29
33
os :
@@ -49,38 +53,47 @@ jobs:
49
53
julia-threads : ' 2'
50
54
test-hgf-tkr : ' true'
51
55
steps :
52
- - uses : actions/checkout@v2
53
- - uses : julia-actions/setup-julia@v1
56
+ - uses : actions/checkout@v4
57
+ - uses : julia-actions/install-juliaup@v2
54
58
with :
55
- version : ${{ matrix.version }}
56
- arch : ${{ matrix.arch }}
57
- - uses : actions/cache@v1
58
- env :
59
- cache-name : cache-artifacts
60
- with :
61
- path : ~/.julia/artifacts
62
- key : ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
63
- restore-keys : |
64
- ${{ runner.os }}-test-${{ env.cache-name }}-
65
- ${{ runner.os }}-test-
66
- ${{ runner.os }}-
67
- - run : julia --project -e 'using Pkg; Pkg.instantiate(); Pkg.build(); Pkg.test(; coverage=true)';
59
+ channel : ${{ matrix.version }}
60
+ - uses : julia-actions/cache@v2
61
+ - uses : julia-actions/julia-buildpkg@v1
62
+ - uses : julia-actions/julia-runtest@v1
68
63
- uses : julia-actions/julia-processcoverage@v1
69
- - uses : codecov/codecov-action@v1
64
+ - uses : codecov/codecov-action@v4
70
65
with :
71
- file : lcov.info
72
-
66
+ files : lcov.info
67
+ token : ${{ secrets.CODECOV_TOKEN }}
68
+ fail_ci_if_error : false
73
69
docs :
74
70
name : Documentation
75
71
runs-on : ubuntu-latest
72
+ permissions :
73
+ actions : write # needed to allow julia-actions/cache to proactively delete old caches that it has created
74
+ contents : write
75
+ statuses : write
76
76
steps :
77
- - uses : actions/checkout@v2
78
- - uses : julia-actions/setup-julia@v1
77
+ - uses : actions/checkout@v4
78
+ - uses : julia-actions/setup-julia@v2
79
79
with :
80
80
version : ' 1'
81
- - run : julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
82
- Pkg.instantiate()'
83
- - run : julia --project=docs docs/make.jl
81
+ - uses : julia-actions/cache@v2
82
+ - name : Configure doc environment
83
+ shell : julia --project=docs --color=yes {0}
84
+ run : |
85
+ using Pkg
86
+ Pkg.develop(PackageSpec(path=pwd()))
87
+ Pkg.instantiate()
88
+ - uses : julia-actions/julia-buildpkg@v1
89
+ - uses : julia-actions/julia-docdeploy@v1
84
90
env :
85
91
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86
92
DOCUMENTER_KEY : ${{ secrets.DOCUMENTER_KEY }}
93
+ - name : Run doctests
94
+ shell : julia --project=docs --color=yes {0}
95
+ run : |
96
+ using Documenter: DocMeta, doctest
97
+ using Transformers
98
+ DocMeta.setdocmeta!(Transformers, :DocTestSetup, :(using Transformers); recursive=true)
99
+ doctest(Transformers)
0 commit comments