|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + - push |
| 4 | + - pull_request |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + name: Julia ${{ matrix.version }} - ${{ matrix.os }} |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + version: |
| 13 | + - 'lts' |
| 14 | + - '1' |
| 15 | + os: |
| 16 | + - ubuntu-latest |
| 17 | + - macOS-latest |
| 18 | + - windows-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - uses: julia-actions/setup-julia@v2 |
| 22 | + with: |
| 23 | + version: ${{ matrix.version }} |
| 24 | + - uses: actions/cache@v1 |
| 25 | + env: |
| 26 | + cache-name: cache-artifacts |
| 27 | + with: |
| 28 | + path: ~/.julia/artifacts |
| 29 | + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} |
| 30 | + restore-keys: | |
| 31 | + ${{ runner.os }}-test-${{ env.cache-name }}- |
| 32 | + ${{ runner.os }}-test- |
| 33 | + ${{ runner.os }}- |
| 34 | + - uses: julia-actions/julia-buildpkg@latest |
| 35 | + - run: | |
| 36 | + git config --global user.name Tester |
| 37 | + git config --global user.email te@st.er |
| 38 | + - uses: julia-actions/julia-runtest@latest |
| 39 | + continue-on-error: ${{ matrix.version == 'nightly' }} |
| 40 | + - uses: julia-actions/julia-processcoverage@v1 |
| 41 | + - uses: codecov/codecov-action@v4 |
| 42 | + with: |
| 43 | + file: lcov.info |
| 44 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 45 | + docs: |
| 46 | + name: Documentation |
| 47 | + runs-on: ubuntu-latest |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + - uses: julia-actions/setup-julia@v2 |
| 51 | + with: |
| 52 | + version: '1' |
| 53 | + - run: | |
| 54 | + git config --global user.name name |
| 55 | + git config --global user.email email |
| 56 | + git config --global github.user username |
| 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 DIVAnd |
| 66 | + doctest(DIVAnd)' |
| 67 | + - run: julia --project=docs docs/make.jl |
| 68 | + env: |
| 69 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 70 | + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
0 commit comments