use pre-compiled binary of gcov2lcov #129
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: test | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
if: success() | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.15.x | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Integration test | |
run: | | |
# perform an integration test with original gcov2lcov integration | |
# test data, which is available in the testdata/ directory. | |
docker build -t gcov2lcov-action . | |
# create bare-bones go project to run the action on | |
mkdir -p gcov2lcov/.git | |
echo -e '[remote "origin"]\nurl = git@github.com:jandelgado/gcov2lcov\n' > gcov2lcov/.git/config | |
echo -e "package main\n" > gcov2lcov/main.go | |
echo -e "module github.com/jandelgado/gcov2lcov\ngo 1.15\n" > gcov2lcov/go.mod | |
cp testdata/coverage.out gcov2lcov/ | |
docker run -e "GITHUB_WORKSPACE=/test" \ | |
-e "INPUT_INFILE=coverage.out" \ | |
-e "INPUT_OUTFILE=coverage.lcov" \ | |
-i --rm -v "$PWD/gcov2lcov:/test" gcov2lcov-action | |
diff -y testdata/coverage_expected.lcov gcov2lcov/coverage.lcov |