forked from jupyterlab/maintainer-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
37 lines (35 loc) · 1.08 KB
/
action.yml
File metadata and controls
37 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: "Upload Coverage"
description: "Upload the coverage report(s) for this job"
inputs:
# Optional inputs
artifact_name:
description: The artifact name - useful if multiple artifacts are created
required: false
default: ""
runs:
using: "composite"
steps:
- name: Rename coverage file
shell: bash
run: |
if [ -f ".coverage" ]; then
mv .coverage ".coverage.-$$-$RANDOM"
fi
- name: Handle artifact name
id: artifact-name
shell: bash
run: |
export ARTIFACT_NAME=${INPUTS_ARTIFACT_NAME}
if [ -z "$ARTIFACT_NAME" ]; then
export ARTIFACT_NAME="coverage-$RANDOM"
fi
echo "artifact_name=$ARTIFACT_NAME" >> "$GITHUB_OUTPUT"
env:
INPUTS_ARTIFACT_NAME: ${{ inputs.artifact_name }}
- name: Upload coverage data
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ steps.artifact-name.outputs.artifact_name }}
path: ".coverage.*"
if-no-files-found: ignore
include-hidden-files: true