Avoid using separate tasks for code evaluation (#317) #894
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| merge_group: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| concurrency: | |
| # Skip intermediate builds: all builds except for builds on the `main` branch | |
| # Cancel intermediate builds: only pull request builds | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| finalize: | |
| timeout-minutes: 10 | |
| needs: [test, format] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: | | |
| echo test: ${{ needs.test.result }} | |
| echo format: ${{ needs.format.result }} | |
| - run: exit 1 | |
| if: | | |
| (needs.test.result != 'success') || | |
| (needs.format.result != 'success') | |
| test: | |
| permissions: | |
| actions: write | |
| contents: read | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 90 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - "1.6" | |
| - "1.11" | |
| os: | |
| - ubuntu-latest | |
| - macos-15-intel | |
| - windows-latest | |
| # macOS 1.6 seems to consistently stall on `Plots` notebooks. Skip this | |
| # combination and test on a slightly newer macOS version instead. | |
| # 1.6 windows has recently stalled out on mimetypes, use 1.7 windows in | |
| # the tests. We still test 1.6 on Linux. | |
| exclude: | |
| - version: "1.6" | |
| os: macos-15-intel | |
| - version: "1.6" | |
| os: windows-latest | |
| # Performance regressions on Julia 1.11 on Windows. Currently not | |
| # viable to run the test suite there. | |
| - version: "1.11" | |
| os: windows-latest | |
| include: | |
| - version: "1.7" | |
| os: macos-15-intel | |
| - version: "1.7" | |
| os: windows-latest | |
| - version: "1.10" | |
| os: windows-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: julia-actions/install-juliaup@1da6847c869cd68e3a32b8f52fe8f005b8cd5ece # v2.2.1 | |
| with: | |
| channel: "${{ matrix.version }}" | |
| # These versions of `julia` are used for the cross-version notebook tests. | |
| - run: juliaup add 1.9.4 | |
| - run: juliaup add 1.10.7 | |
| - run: juliaup add 1.11.2 | |
| - uses: julia-actions/cache@d10a6fd8f31b12404a54613ebad242900567f2b9 # v2.1.0 | |
| - uses: r-lib/actions/setup-r@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4 | |
| with: | |
| use-public-rspm: true | |
| r-version: "4.3.3" | |
| - run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| if: matrix.os == 'ubuntu-latest' | |
| - run: julia -e 'cp("/usr/lib/x86_64-linux-gnu/libstdc++.so.6", joinpath(dirname(Sys.BINDIR), "lib", "julia", "libstdc++.so.6"); force = true)' | |
| if: matrix.os == 'ubuntu-latest' && matrix.version == '1.6' | |
| # Worker tests | |
| # Plots.jl's GR backend uses Julia 1.10+ syntax. Remove it on older | |
| # Julia to avoid compile errors; the test is filtered out via tags. | |
| - run: julia --project=src/QuartoNotebookWorker/test -e 'using Pkg; Pkg.rm("Plots"; io=devnull)' | |
| if: matrix.version == '1.6' || matrix.version == '1.7' | |
| - uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1.7.0 | |
| with: | |
| project: src/QuartoNotebookWorker | |
| - uses: julia-actions/julia-runtest@d60b785c6f2bdf4ebfb18b2b6f7d93b7dfb0efe3 # v1.11.4 | |
| with: | |
| project: src/QuartoNotebookWorker | |
| depwarn: "yes" | |
| # Runner tests | |
| # TODO: use quarto_jll for integration tests once modern enough versions are available | |
| - uses: quarto-dev/quarto-actions/setup@8a96df13519ee81fd526f2dfca5962811136661b # v2.2.0 | |
| with: | |
| version: 1.7.17 | |
| - uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1.7.0 | |
| - uses: julia-actions/julia-runtest@d60b785c6f2bdf4ebfb18b2b6f7d93b7dfb0efe3 # v1.11.4 | |
| with: | |
| depwarn: "yes" | |
| - uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38 # v1.2.2 | |
| if: matrix.os == 'ubuntu-latest' && matrix.version == '1.11' | |
| - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| if: matrix.os == 'ubuntu-latest' && matrix.version == '1.11' | |
| with: | |
| verbose: true | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| format: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2.6.1 | |
| with: | |
| version: "1" | |
| - run: | | |
| julia --project=.ci -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()' | |
| julia --project=.ci .ci/format.jl |