-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
34 lines (31 loc) · 1.11 KB
/
action.yml
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
name: gcov2lcov-action
description: "convert golang coverage to lcov format"
inputs:
infile:
description: "go coverage input file"
required: false
default: coverage.out
outfile:
description: "lcov output file"
required: false
default: coverage.lcov
version:
description: "gcov2lcov version"
required: false
default: latest
working-directory:
description: "change working directory"
required: false
runs:
using: composite
steps:
- shell: bash
run: 'set -x && curl -sLf "$([ ${{inputs.version}} == latest ] && echo $LATEST_RELEASE || echo $RELEASE)/${NAME}.tar.gz" | tar zxf - --strip 1'
working-directory: /tmp
env:
NAME: "gcov2lcov-linux-amd64"
RELEASE: "https://github.com/jandelgado/gcov2lcov/releases/download/${{inputs.version}}"
LATEST_RELEASE: "https://github.com/jandelgado/gcov2lcov/releases/latest/download"
- shell: bash
run: 'set -x && GOROOT=$(go env GOROOT) /tmp/gcov2lcov-linux-amd64 -infile "${{ inputs.infile }}" -outfile "${{ inputs.outfile }}"'
working-directory: ${{ inputs.working-directory }}