Skip to content

Commit

Permalink
feat(ci): update coverage workflow
Browse files Browse the repository at this point in the history
This renames the workflow inputs to be more consistent with the rest of
the workflows. And adds the ability to pass Codecov token.
  • Loading branch information
aymanbagabas committed Sep 18, 2024
1 parent 117014e commit 4d4e271
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: build
name: coverage

on:
workflow_call:
inputs:
go_version:
go-version:
required: false
type: string
default: stable
test_timeout:
go-version-file:
required: false
type: string
working-directory:
required: false
type: string
test-timeout:
required: false
type: string
default: 5m
Expand All @@ -30,10 +36,11 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go_version }}
go-version: ${{ inputs.go-version }}
go-version-file: ${{ inputs.go-version-file }}
cache: true
- name: Test
run: go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -timeout ${{ inputs.test_timeout }}
run: go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -timeout ${{ inputs.test-timeout }}
- uses: codecov/codecov-action@v4
with:
file: ./coverage.txt

0 comments on commit 4d4e271

Please sign in to comment.