mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-12 11:06:54 +08:00
Compare commits
3 Commits
dependabot
...
ib/info_on
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
198ed292c4 | ||
|
|
65a5f81584 | ||
|
|
f098dd2fa4 |
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Example.jl
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
repository: julia-actions/Example.jl
|
||||
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Checkout julia-runtest
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
path: ./.github/actions/julia-runtest
|
||||
|
||||
@@ -71,13 +71,13 @@ jobs:
|
||||
|
||||
- uses: julia-actions/cache@d10a6fd8f31b12404a54613ebad242900567f2b9 # v2.1.0
|
||||
|
||||
- uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1.7.0
|
||||
# - uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1.7.0
|
||||
|
||||
- uses: ./.github/actions/julia-runtest
|
||||
|
||||
- uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38
|
||||
|
||||
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
|
||||
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
|
||||
with:
|
||||
files: lcov.info
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
2
.github/workflows/test_logger_ci.yml
vendored
2
.github/workflows/test_logger_ci.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout julia-runtest
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2.6.1
|
||||
with:
|
||||
|
||||
34
action.yml
34
action.yml
@@ -66,9 +66,39 @@ runs:
|
||||
prefix=( ${{ inputs.prefix }} )
|
||||
[[ -n ${prefix[*]} ]] && julia_cmd=( "${prefix[@]}" "${julia_cmd[@]}" )
|
||||
|
||||
# Run the Julia command
|
||||
# Determine which signal to use for diagnostics based on OS
|
||||
if [[ "$(uname -s)" == "Darwin" ]] || [[ "$(uname -s)" == *"BSD"* ]]; then
|
||||
info_signal="INFO"
|
||||
else
|
||||
info_signal="USR1"
|
||||
fi
|
||||
|
||||
# Set up signal handler to send diagnostic signal when we receive SIGTERM
|
||||
# (which GitHub Actions sends on timeout/cancellation)
|
||||
trap_handler() {
|
||||
echo "::warning::Timeout/cancellation detected - sending SIG${info_signal} to Julia process for diagnostic output"
|
||||
if kill -0 "$julia_pid" 2>/dev/null; then
|
||||
kill -s "$info_signal" "$julia_pid" 2>/dev/null || true
|
||||
# Give Julia a moment to print diagnostics before we get killed
|
||||
sleep 2
|
||||
fi
|
||||
# Re-send SIGTERM to Julia to ensure it terminates
|
||||
kill -TERM "$julia_pid" 2>/dev/null || true
|
||||
wait "$julia_pid" 2>/dev/null || true
|
||||
exit 124 # Standard timeout exit code
|
||||
}
|
||||
trap trap_handler SIGTERM SIGINT
|
||||
|
||||
# Run the Julia command in the background so we can handle signals
|
||||
echo "::debug::Executing Julia: ${julia_cmd[*]}"
|
||||
"${julia_cmd[@]}"
|
||||
"${julia_cmd[@]}" &
|
||||
julia_pid=$!
|
||||
|
||||
# Wait for Julia to complete
|
||||
wait "$julia_pid"
|
||||
exit_code=$?
|
||||
|
||||
exit $exit_code
|
||||
shell: bash
|
||||
env:
|
||||
ANNOTATE: ${{ inputs.annotate }}
|
||||
|
||||
@@ -25,16 +25,8 @@ if haskey(ENV, "GITHUB_SHA") && get(ENV, "GITHUB_EVENT_NAME", "") == "pull_reque
|
||||
|
||||
# Check if there's any difference between the merge commit and the PR head
|
||||
# In GitHub Actions, HEAD^2 is the PR head (second parent of merge commit)
|
||||
# First check if HEAD^2 exists (i.e., this is actually a merge commit)
|
||||
if success(`git rev-parse --verify --quiet HEAD^2`)
|
||||
# Compare tree hashes to check if content actually differs
|
||||
merge_tree = chomp(read(`git rev-parse HEAD^\{tree\}`, String))
|
||||
pr_tree = chomp(read(`git rev-parse HEAD^2^\{tree\}`, String))
|
||||
has_diff = merge_tree != pr_tree
|
||||
else
|
||||
# Not a merge commit, so no difference to report
|
||||
has_diff = false
|
||||
end
|
||||
# success() returns true if the command exits with 0 (no differences)
|
||||
has_diff = !success(`git diff --quiet --exit-code HEAD^2 HEAD`)
|
||||
|
||||
if has_diff
|
||||
base_branch = isempty(base_branch_name) ? "the base branch" : "'$base_branch_name'"
|
||||
|
||||
Reference in New Issue
Block a user