Skip to content

[CI] Add downgrade checks #20

[CI] Add downgrade checks

[CI] Add downgrade checks #20

Workflow file for this run

# see https://www.stochasticlifestyle.com/semantic-versioning-semver-is-flawed-and-downgrade-ci-is-required-to-fix-it/
name: Downgrade
on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.genmat1.outputs.matrix || steps.genmat2.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1
- run: julia -e 'using Pkg; pkg"add CompatHelperLocal"'
- run: julia -e 'using Pkg; pkg"add Copulas"'
- if: true #github.event.inputs.mode == 'two'
id: genmat1
run: |
echo '::echo::on'
julia -e 'import CompatHelperLocal as CHL; import Copulas; projfile = joinpath(pathof(Copulas) |> dirname |> dirname, "Project.toml"); println(CHL.compats_combinations_to_gha_string(CHL.get_compats_combinations(projfile, only_resolveable=true)))'
- if: false # github.event.inputs.mode == 'all'
id: genmat2
run: |
echo '::echo::on'
julia -e 'import CompatHelperLocal as CHL; import Copulas; projfile = joinpath(pathof(Copulas) |> dirname |> dirname, "Project.toml"); println(CHL.compats_combinations_to_gha_string(CHL.get_all_compats_combinations(projfile)))'
test:
needs: generate-matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJSON(needs.generate-matrix.outputs.matrix)}}
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1
- run: julia -e 'using Pkg; pkg"add CompatHelperLocal"'
- run: julia -e 'using Pkg; pkg"add Copulas"'
- run: julia -e 'import CompatHelperLocal as CHL; import Copulas; CHL.test_compats_combinations(Copulas, [${{ matrix.compats }}])'