Skip to content

Commit

Permalink
Add regression-tests.yml for manually testing dependent packages (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Nov 2, 2023
1 parent a13ef9a commit c6abf9d
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
@@ -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"))

0 comments on commit c6abf9d

Please sign in to comment.