Skip to content

Commit 48becdb

Browse files
committed
update CI
1 parent f189916 commit 48becdb

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

.github/workflows/CI.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ on:
33
push:
44
branches:
55
- main
6-
tags: '*'
7-
pull_request:
6+
tags: ['*']
7+
pull_request:
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/') }}
814
jobs:
915
test:
1016
name: ${{ matrix.group }} - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -32,16 +38,7 @@ jobs:
3238
if: ${{ matrix.version == '1.10' }}
3339
with:
3440
skip: Pkg,TOML,Statistics
35-
- uses: actions/cache@v4
36-
env:
37-
cache-name: cache-artifacts
38-
with:
39-
path: ~/.julia/artifacts
40-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
41-
restore-keys: |
42-
${{ runner.os }}-test-${{ env.cache-name }}-
43-
${{ runner.os }}-test-
44-
${{ runner.os }}-
41+
- uses: julia-actions/cache@v2
4542
- uses: julia-actions/julia-buildpkg@v1
4643
- uses: julia-actions/julia-runtest@v1
4744
env:
@@ -51,21 +48,34 @@ jobs:
5148
with:
5249
token: ${{ secrets.CODECOV_TOKEN }}
5350
file: lcov.info
51+
fail_ci_if_error: true
5452
docs:
5553
name: Documentation
5654
runs-on: ubuntu-latest
55+
permissions:
56+
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
57+
contents: write
58+
statuses: write
5759
steps:
5860
- uses: actions/checkout@v4
5961
- uses: julia-actions/setup-julia@v2
6062
with:
6163
version: '1'
64+
- uses: julia-actions/cache@v2
65+
- name: Configure doc environment
66+
shell: julia --project=docs --color=yes {0}
67+
run: |
68+
using Pkg
69+
Pkg.develop(PackageSpec(path=pwd()))
70+
Pkg.instantiate()
6271
- uses: julia-actions/julia-buildpkg@v1
6372
- uses: julia-actions/julia-docdeploy@v1
6473
env:
6574
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6675
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
67-
- run: |
68-
julia --project=docs -e '
76+
- name: Run doctests
77+
shell: julia --project=docs --color=yes {0}
78+
run: |
6979
using Documenter: DocMeta, doctest
7080
using DistributionFits
7181
DocMeta.setdocmeta!(DistributionFits, :DocTestSetup, :(using Statistics, Distributions, DistributionFits); recursive=true)

0 commit comments

Comments
 (0)