Skip to content

Commit

Permalink
Merge pull request #1081 from DilumAluthge/dpa/fix-integration-ci
Browse files Browse the repository at this point in the history
Fix the integration tests
  • Loading branch information
ablaom authored Jan 14, 2024
2 parents fc139f2 + 285147e commit 9c31d30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ jobs:
arch:
- x64
steps:
- name: Determine if PR is from a fork
run: |
echo "head_ref is: ${{ github.head_ref }}"
echo "target repository is: ${{ github.repository }}"
echo "head repository is: ${{ github.event.pull_request.head.repo.full_name }}"
- name: Set integration test flag
if: (github.head_ref == 'dev') && (github.repository == github.event.pull_request.head.repo.full_name)
run: |
echo "MLJ_TEST_INTEGRATION=true" >> "${GITHUB_ENV:?}"
- name: Verify the value of the integration test flag
run: |
julia - e '
open("ENV[\"GITHUB_ENV\"]", "a") do io
name = "MLJ_TEST_INTEGRATION"
value = "true"
line = "$(name)=$(value)"
println(io, line)
end'
if: (${{ github.head_ref }} == "dev") && (${{ github.repository }} == ${{ github.event.pull_request.head.repo.full_name }})
echo "MLJ_TEST_INTEGRATION is ${MLJ_TEST_INTEGRATION}"
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ end
@test include("scitypes.jl")
end

if get(ENV, "MLJ_TEST_INTEGRATION", "false") == "true"
if parse(Bool, get(ENV, "MLJ_TEST_INTEGRATION", "false"))
@testset "integration" begin
@test include("integration.jl")
end
Expand Down

0 comments on commit 9c31d30

Please sign in to comment.