Skip to content

Commit ca53cc4

Browse files
committed
update ci
1 parent 9fefeb3 commit ca53cc4

File tree

5 files changed

+74
-70
lines changed

5 files changed

+74
-70
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: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CompatHelper.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
name: CompatHelper
2-
32
on:
43
schedule:
5-
- cron: '00 * * * *'
6-
issues:
7-
types: [opened, reopened]
8-
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
96
jobs:
10-
build:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
julia-version: [1.5.1]
15-
julia-arch: [x86]
16-
os: [ubuntu-latest]
7+
CompatHelper:
8+
runs-on: ubuntu-latest
179
steps:
18-
- uses: julia-actions/setup-julia@latest
19-
with:
20-
version: ${{ matrix.julia-version }}
2110
- name: Pkg.add("CompatHelper")
2211
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
2312
- name: CompatHelper.main()
2413
env:
2514
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
2616
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
name: TagBot
22
on:
3-
issue_comment:
3+
issue_comment:
44
types:
55
- created
6-
workflow_dispatch:
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: "3"
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
723
jobs:
824
TagBot:
925
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
@@ -12,3 +28,4 @@ jobs:
1228
- uses: JuliaRegistries/TagBot@v1
1329
with:
1430
token: ${{ secrets.GITHUB_TOKEN }}
31+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci-pretrain.yml

-23
This file was deleted.

.github/workflows/ci.yml

+43-30
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
65
- master
76
tags: '*'
87
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/') }}
1414
jobs:
1515
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 }}
1717
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
1821
env:
1922
JULIA_NUM_THREADS: ${{ matrix.julia-threads }}
2023
JL_TRF_TEST_TKR: ${{ matrix.test-hgf-tkr }}
@@ -24,6 +27,7 @@ jobs:
2427
matrix:
2528
version:
2629
- '1.10' # Replace this with the minimum Julia version that your package supports.
30+
- '1.11'
2731
# - '1' # automatically expands to the latest stable 1.x release of Julia
2832
# - 'nightly'
2933
os:
@@ -49,38 +53,47 @@ jobs:
4953
julia-threads: '2'
5054
test-hgf-tkr: 'true'
5155
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
5458
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
6863
- uses: julia-actions/julia-processcoverage@v1
69-
- uses: codecov/codecov-action@v1
64+
- uses: codecov/codecov-action@v4
7065
with:
71-
file: lcov.info
72-
66+
files: lcov.info
67+
token: ${{ secrets.CODECOV_TOKEN }}
68+
fail_ci_if_error: false
7369
docs:
7470
name: Documentation
7571
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
7676
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
7979
with:
8080
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
8490
env:
8591
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8692
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

Comments
 (0)