|
1 | 1 | name: CI
|
2 | 2 | on:
|
3 |
| - pull_request: |
4 |
| - branches: |
5 |
| - - master |
6 | 3 | push:
|
7 | 4 | branches:
|
8 | 5 | - master
|
9 |
| - tags: '*' |
| 6 | + tags: ['*'] |
| 7 | + pull_request: |
| 8 | + workflow_dispatch: |
| 9 | + |
10 | 10 | jobs:
|
| 11 | + |
11 | 12 | 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 |
14 | 19 | strategy:
|
15 | 20 | fail-fast: false
|
16 | 21 | matrix:
|
17 | 22 | version:
|
18 |
| - - '1.6' |
| 23 | + - 'lts' |
19 | 24 | - '1'
|
20 |
| - - 'nightly' |
21 |
| - os: |
22 |
| - - ubuntu-latest |
23 |
| - arch: |
24 |
| - - x64 |
| 25 | + # - 'pre' # TODO: tests on pre-release version |
25 | 26 | steps:
|
26 | 27 | - uses: actions/checkout@v4
|
27 |
| - - uses: julia-actions/setup-julia@v1 |
| 28 | + - uses: julia-actions/setup-julia@v2 |
28 | 29 | with:
|
29 | 30 | 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 |
41 | 33 | - uses: julia-actions/julia-buildpkg@v1
|
42 |
| - continue-on-error: ${{ matrix.version == 'nightly' }} |
43 | 34 | - uses: julia-actions/julia-runtest@v1
|
44 |
| - continue-on-error: ${{ matrix.version == 'nightly' }} |
45 | 35 | - uses: julia-actions/julia-processcoverage@v1
|
| 36 | + with: |
| 37 | + directories: src,ext,test,benchmark |
46 | 38 | - uses: codecov/codecov-action@v4
|
47 | 39 | with:
|
48 |
| - file: lcov.info |
| 40 | + files: lcov.info |
| 41 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 42 | + slug: Julia-XAI/ExplainableAI.jl |
| 43 | + |
49 | 44 | docs:
|
50 | 45 | name: Documentation
|
51 | 46 | 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 |
52 | 51 | steps:
|
53 | 52 | - uses: actions/checkout@v4
|
54 |
| - - uses: julia-actions/setup-julia@v1 |
| 53 | + - uses: julia-actions/setup-julia@v2 |
55 | 54 | with:
|
56 | 55 | 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 |
68 | 67 | env:
|
69 | 68 | DATADEPS_ALWAYS_ACCEPT: true # for MLDatasets download
|
70 | 69 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
71 | 70 | 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