Skip to content

Merge pull request #5 from ucpr/upload-coverage-to-codeclimate #40

Merge pull request #5 from ucpr/upload-coverage-to-codeclimate

Merge pull request #5 from ucpr/upload-coverage-to-codeclimate #40

Workflow file for this run

name: CI
on:
push:
paths:
- "**/*.go"
- ".github/workflows/ci.yaml"
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/[email protected]
- name: Setup Go
uses: actions/[email protected]
id: setup-go
with:
go-version-file: ./go.mod
cache-dependency-path: ./go.sum
- name: Download Go modules
shell: bash
if: ${{ steps.setup-go.outputs.cache-hit != 'true' }}
run: |
go mod download
go mod verify
- name: Test
run: make FLAGS="-coverprofile=coverage.out" test
- name: Build
run: make build
- uses: jandelgado/[email protected]
with:
infile: coverage.out
outfile: coverage.lcov
version: v1.0.6
- name: Report coverage to CodeClimate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/coverage.lcov:lcov
verifyDownload: true