From c6abf9d7f00acd0293a6bad90267ea0669c01ab7 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Thu, 2 Nov 2023 17:05:50 +1300 Subject: [PATCH] Add regression-tests.yml for manually testing dependent packages (#2323) --- .github/workflows/regression-tests.yml | 79 ++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/regression-tests.yml diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml new file mode 100644 index 0000000000..ea7fc09540 --- /dev/null +++ b/.github/workflows/regression-tests.yml @@ -0,0 +1,79 @@ +name: regression-tests +on: + workflow_dispatch: +jobs: + test-dependent-packages: + name: run-tests-${{ matrix.package }} + runs-on: ubuntu-latest + env: + PACKAGE: ${{ matrix.package }} + strategy: + fail-fast: false + matrix: + include: + - package: 'DocumenterCitations' + - package: 'DocumenterMermaid' + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - name: Test + shell: julia --color=yes {0} + run: | + import Pkg + Pkg.develop(Pkg.PackageSpec(; path = pwd())) + Pkg.develop(ENV["PACKAGE"]) + Pkg.test(ENV["PACKAGE"]) + test-documentation-build: + name: doc-build-${{ matrix.package }} + runs-on: ubuntu-latest + env: + PACKAGE: ${{ matrix.package }} + strategy: + fail-fast: false + matrix: + include: + - package: 'MathOptInterface' + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - name: install-and-build-documentation + shell: julia --color=yes {0} + run: | + import Pkg + # Install the PACKAGE into `Pkg.devdir()` + Pkg.develop(ENV["PACKAGE"]) + # Assume that there is an docs/Project.toml + doc_path = joinpath(Pkg.devdir(), ENV["PACKAGE"], "docs") + Pkg.activate(doc_path) + # Change the TOML to include the package and this version of Documenter + Pkg.develop(ENV["PACKAGE"]) + Pkg.develop(Pkg.PackageSpec(path=pwd())) + # Install + Pkg.instantiate() + # Build the docs + include(joinpath(doc_path, "make.jl"))