mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-20 06:56:54 +08:00
Add test failure annotations on v1.8+ (#58)
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
This commit is contained in:
19
action.yml
19
action.yml
@@ -29,6 +29,9 @@ inputs:
|
||||
project:
|
||||
description: 'Value passed to the --project flag. The default value is the repository root: "@."'
|
||||
default: '@.'
|
||||
annotate:
|
||||
description: 'Whether or not to attempt to create GitHub annotations to show test failures inline. Only effective on Julia 1.8+.'
|
||||
default: 'false'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
@@ -49,9 +52,18 @@ runs:
|
||||
# the request metadata to pkg.julialang.org when installing
|
||||
# packages via `Pkg.test`.
|
||||
JULIA_PKG_SERVER: ""
|
||||
- name: Install dependencies in their own (shared) environment
|
||||
run: |
|
||||
if VERSION > v"1.8pre"
|
||||
using Pkg
|
||||
Pkg.activate("tests-logger-env"; shared=true)
|
||||
Pkg.add(Pkg.PackageSpec(name="GitHubActions", version="0.1"))
|
||||
end
|
||||
shell: julia --color=yes {0}
|
||||
if: inputs.annotate == 'true'
|
||||
- run: |
|
||||
# The Julia command that will be executed
|
||||
julia_cmd=( julia --color=yes --depwarn=${{ inputs.depwarn }} --inline=${{ inputs.inline }} --project=${{ inputs.project }} -e 'import Pkg;include(joinpath(ENV["GITHUB_ACTION_PATH"], "kwargs.jl"));kwargs = Kwargs.kwargs(;coverage = :(${{ inputs.coverage }}),force_latest_compatible_version = :(${{ inputs.force_latest_compatible_version }}), julia_args = ["--check-bounds=${{ inputs.check_bounds }}"]);Pkg.test(; kwargs...)' )
|
||||
julia_cmd=( julia --color=yes --depwarn=${{ inputs.depwarn }} --inline=${{ inputs.inline }} --project=${{ inputs.project }} -e 'include(joinpath(ENV["GITHUB_ACTION_PATH"], "test_harness.jl"))' )
|
||||
|
||||
# Add the prefix in front of the command if there is one
|
||||
prefix="${{ inputs.prefix }}"
|
||||
@@ -60,3 +72,8 @@ runs:
|
||||
# Run the Julia command
|
||||
"${julia_cmd[@]}"
|
||||
shell: bash
|
||||
env:
|
||||
ANNOTATE: ${{ inputs.annotate }}
|
||||
COVERAGE: ${{ inputs.coverage }}
|
||||
FORCE_LATEST_COMPATIBLE_VERSION: ${{ inputs.force_latest_compatible_version }}
|
||||
CHECK_BOUNDS: ${{ inputs.check_bounds }}
|
||||
|
||||
Reference in New Issue
Block a user