|
1 | 1 | name: CI |
2 | 2 | on: |
3 | | - - push |
4 | | - - pull_request |
5 | | -env: |
6 | | - JULIA_NUM_THREADS: 2 |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 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/') }} |
7 | 14 | jobs: |
8 | 15 | test: |
9 | | - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} |
| 16 | + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} |
10 | 17 | runs-on: ${{ matrix.os }} |
| 18 | + timeout-minutes: 60 |
| 19 | + permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created |
| 20 | + actions: write |
| 21 | + contents: read |
11 | 22 | strategy: |
12 | 23 | fail-fast: false |
13 | 24 | matrix: |
14 | 25 | version: |
15 | 26 | - '1.10' |
16 | | - # - 'nightly' |
| 27 | + - 'pre' |
17 | 28 | os: |
18 | 29 | - ubuntu-latest |
19 | | - # - macOS-latest |
20 | | - # - windows-latest |
21 | 30 | arch: |
22 | 31 | - x64 |
23 | | - # - x86 |
24 | | - exclude: |
25 | | - - os: macOS-latest |
26 | | - # arch: x86 |
27 | 32 | steps: |
28 | | - - uses: actions/checkout@v2 |
29 | | - - uses: julia-actions/setup-julia@v1 |
| 33 | + - uses: actions/checkout@v4 |
| 34 | + - uses: julia-actions/setup-julia@v2 |
30 | 35 | with: |
31 | 36 | version: ${{ matrix.version }} |
32 | 37 | arch: ${{ matrix.arch }} |
33 | | - - uses: actions/cache@v1 |
34 | | - env: |
35 | | - cache-name: cache-artifacts |
36 | | - with: |
37 | | - path: ~/.julia/artifacts |
38 | | - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} |
39 | | - restore-keys: | |
40 | | - ${{ runner.os }}-test-${{ env.cache-name }}- |
41 | | - ${{ runner.os }}-test- |
42 | | - ${{ runner.os }}- |
| 38 | + - uses: julia-actions/cache@v2 |
43 | 39 | - uses: julia-actions/julia-buildpkg@v1 |
44 | 40 | - uses: julia-actions/julia-runtest@v1 |
45 | 41 | - uses: julia-actions/julia-processcoverage@v1 |
46 | | - - uses: codecov/codecov-action@v1 |
| 42 | + - uses: codecov/codecov-action@v4 |
47 | 43 | with: |
48 | | - file: lcov.info |
| 44 | + files: lcov.info |
| 45 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 46 | + fail_ci_if_error: false |
49 | 47 | docs: |
50 | 48 | name: Documentation |
51 | 49 | runs-on: ubuntu-latest |
| 50 | + permissions: |
| 51 | + actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created |
| 52 | + contents: write |
| 53 | + statuses: write |
52 | 54 | steps: |
53 | | - - uses: actions/checkout@v2 |
54 | | - - uses: julia-actions/setup-julia@v1 |
| 55 | + - uses: actions/checkout@v4 |
| 56 | + - uses: julia-actions/setup-julia@v2 |
55 | 57 | with: |
56 | 58 | version: '1' |
57 | | - - run: | |
58 | | - julia --project=docs -e ' |
59 | | - using Pkg |
60 | | - Pkg.develop(PackageSpec(path=pwd())) |
61 | | - Pkg.add(PackageSpec(name="Healpix", rev="master")); |
62 | | - Pkg.instantiate()' |
63 | | - - run: | |
64 | | - julia --project=docs -e ' |
65 | | - using Pkg |
66 | | - Pkg.develop(PackageSpec(path=pwd())) |
67 | | - Pkg.instantiate()' |
68 | | - - run: | |
69 | | - julia --project=docs -e ' |
70 | | - using Documenter: doctest |
71 | | - using XGPaint |
72 | | - doctest(XGPaint)' |
73 | | - - run: julia --project=docs docs/make.jl |
| 59 | + - uses: julia-actions/cache@v2 |
| 60 | + - name: Configure doc environment |
| 61 | + shell: julia --project=docs --color=yes {0} |
| 62 | + run: | |
| 63 | + using Pkg |
| 64 | + Pkg.develop(PackageSpec(path=pwd())) |
| 65 | + Pkg.instantiate() |
| 66 | + - uses: julia-actions/julia-buildpkg@v1 |
| 67 | + - uses: julia-actions/julia-docdeploy@v1 |
74 | 68 | env: |
75 | 69 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
76 | 70 | DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
| 71 | + - name: Run doctests |
| 72 | + shell: julia --project=docs --color=yes {0} |
| 73 | + run: | |
| 74 | + using Documenter: DocMeta, doctest |
| 75 | + using XGPaint |
| 76 | + DocMeta.setdocmeta!(XGPaint, :DocTestSetup, :(using XGPaint); recursive=true) |
| 77 | + doctest(XGPaint) |
0 commit comments