Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/sublibrary-downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ jobs:
[ -n "${{ inputs.skip }}" ] && effective="$effective,${{ inputs.skip }}"
echo "Effective downgrade skip: $effective"
echo "EFFECTIVE_SKIP=$effective" >> "$GITHUB_ENV"
- name: "Save project metadata for QA"
if: "${{ inputs.group-env-value == 'QA' }}"
shell: bash
run: |
save_dir="$RUNNER_TEMP/sciml-downgrade-original-projects"
project_file="${{ matrix.project }}/Project.toml"
mkdir -p "$save_dir"
cp --parents "$project_file" "$save_dir"
- uses: julia-actions/julia-downgrade-compat@v2
with:
projects: ${{ matrix.project }}
Expand All @@ -180,6 +188,13 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
with:
project: ${{ matrix.project }}
- name: "Restore project metadata before QA"
if: "${{ inputs.group-env-value == 'QA' }}"
shell: bash
run: |
save_dir="$RUNNER_TEMP/sciml-downgrade-original-projects"
project_file="${{ matrix.project }}/Project.toml"
cp "$save_dir/$project_file" "$project_file"
- uses: julia-actions/julia-runtest@v1
with:
project: ${{ matrix.project }}
Expand Down
20 changes: 20 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,23 @@ end
subs = wf("sublibrary-project-tests.yml")
@test count("auto-precompile: \${{ inputs.auto-precompile }}", subs) == 4
end

@testset "sublibrary downgrade restores project metadata for QA" begin
txt = read(
joinpath(@__DIR__, "..", ".github", "workflows", "sublibrary-downgrade.yml"),
String,
)
save_at = findfirst("Save project metadata for QA", txt)
downgrade_at = findfirst("julia-actions/julia-downgrade-compat@v2", txt)
build_at = findfirst("julia-actions/julia-buildpkg@v1", txt)
restore_at = findfirst("Restore project metadata before QA", txt)
test_at = findfirst("julia-actions/julia-runtest@v1", txt)
positions = (save_at, downgrade_at, build_at, restore_at, test_at)

@test all(!isnothing, positions)
if all(!isnothing, positions)
@test first(save_at) < first(downgrade_at) < first(build_at) < first(restore_at) <
first(test_at)
end
@test count("if: \"\${{ inputs.group-env-value == 'QA' }}\"", txt) == 2
end
Loading