Skip to content

Commit c364013

Browse files
committed
Updates to CI
1 parent c1f6edf commit c364013

File tree

4 files changed

+84
-45
lines changed

4 files changed

+84
-45
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
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/CI.yml

Lines changed: 25 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,50 @@
11
name: CI
22
on:
3-
pull_request:
4-
branches:
5-
- main
63
push:
74
branches:
85
- main
9-
tags: '*'
6+
tags: ['*']
7+
paths:
8+
- src/**
9+
- test/**
10+
- .github/workflows/CI.yml
11+
- Project.toml
12+
workflow_dispatch:
13+
concurrency:
14+
# Skip intermediate builds: always.
15+
# Cancel intermediate builds: only if it is a pull request build.
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1018
jobs:
1119
test:
1220
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1321
runs-on: ${{ matrix.os }}
22+
timeout-minutes: 60
23+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
24+
actions: write
25+
contents: read
1426
strategy:
1527
fail-fast: false
1628
matrix:
1729
version:
18-
- '1.10' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
19-
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
30+
- '1'
31+
- '1.10'
2032
os:
2133
- ubuntu-latest
2234
arch:
2335
- x64
2436
steps:
25-
- uses: actions/checkout@v2
26-
- uses: julia-actions/setup-julia@v1
37+
- uses: actions/checkout@v4
38+
- uses: julia-actions/setup-julia@v2
2739
with:
2840
version: ${{ matrix.version }}
2941
arch: ${{ matrix.arch }}
30-
- uses: actions/cache@v1
31-
env:
32-
cache-name: cache-artifacts
33-
with:
34-
path: ~/.julia/artifacts
35-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
36-
restore-keys: |
37-
${{ runner.os }}-test-${{ env.cache-name }}-
38-
${{ runner.os }}-test-
39-
${{ runner.os }}-
42+
- uses: julia-actions/cache@v2
4043
- uses: julia-actions/julia-buildpkg@v1
4144
- uses: julia-actions/julia-runtest@v1
4245
- uses: julia-actions/julia-processcoverage@v1
43-
- uses: codecov/codecov-action@v1
44-
with:
45-
file: lcov.info
46-
docs:
47-
name: Documentation
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v2
51-
- uses: julia-actions/setup-julia@v1
46+
- uses: codecov/codecov-action@v5
5247
with:
53-
version: '1'
54-
- run: |
55-
julia --project=docs -e '
56-
using Pkg
57-
Pkg.develop(PackageSpec(path=pwd()))
58-
Pkg.instantiate()'
59-
- run: |
60-
julia --project=docs -e '
61-
using Documenter: doctest
62-
using NASAPrecipitation
63-
doctest(NASAPrecipitation)'
64-
- run: julia --project=docs docs/make.jl
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
48+
files: lcov.info
49+
token: ${{ secrets.CODECOV_TOKEN }}
50+
fail_ci_if_error: false

.github/workflows/CompatHelper.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
name: CompatHelper
2-
32
on:
43
schedule:
54
- cron: 0 0 1 * *
6-
5+
workflow_dispatch:
76
jobs:
87
CompatHelper:
98
runs-on: ubuntu-latest
109
steps:
11-
- uses: julia-actions/setup-julia@latest
1210
- name: Pkg.add("CompatHelper")
1311
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
1412
- name: CompatHelper.main()
1513
env:
1614
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
1716
run: julia -e 'using CompatHelper; CompatHelper.main()'
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
paths:
8+
- docs/**
9+
- src/**
10+
- test/**
11+
- .github/workflows/Documentation.yml
12+
- Project.toml
13+
workflow_dispatch:
14+
concurrency:
15+
# Skip intermediate builds: always.
16+
# Cancel intermediate builds: only if it is a pull request build.
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
19+
jobs:
20+
docs:
21+
name: Documentation
22+
runs-on: ubuntu-latest
23+
permissions:
24+
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
25+
contents: write
26+
statuses: write
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: julia-actions/setup-julia@v2
30+
with:
31+
version: '1'
32+
- uses: julia-actions/cache@v2
33+
- name: Configure doc environment
34+
shell: julia --project=docs --color=yes {0}
35+
run: |
36+
using Pkg
37+
Pkg.develop(PackageSpec(path=pwd()))
38+
Pkg.instantiate()
39+
- uses: julia-actions/julia-buildpkg@v1
40+
- uses: julia-actions/julia-docdeploy@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
44+
- name: Run doctests
45+
shell: julia --project=docs --color=yes {0}
46+
run: |
47+
using Documenter: DocMeta, doctest
48+
using ERA5Reanalysis
49+
DocMeta.setdocmeta!(ERA5Reanalysis, :DocTestSetup, :(using ERA5Reanalysis); recursive=true)
50+
doctest(ERA5Reanalysis)

0 commit comments

Comments
 (0)