Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #71 from everettraven/actions/code_coverage
Browse files Browse the repository at this point in the history
Add an action for CodeCov
  • Loading branch information
everettraven authored Feb 6, 2022
2 parents 70c3a61 + e58fe86 commit 8d02eb3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# GitHub Actions CI/CD to check packageless test coverage
name: coverage

# Run the action on push to main and pull requests
on: [push, pull_request, workflow_dispatch]

# Set up the actual workflow jobs
jobs:
test-coverage:
runs-on: ubuntu-latest

steps:
# Checkout the Repo for testing
- uses: actions/checkout@v2
# Get Docker setup
- uses: docker-practice/actions-setup-docker@master
with:
docker_version: "20.10"
docker_channel: stable
# Set up Go
- uses: actions/setup-go@v2
with:
go-version: 1.16.4

# Run the go tests
- name: Get subcommands package coverage
run: go test -short -race -covermode=atomic -coverprofile=subcommands_coverage.out ./subcommands

# Upload to CodeCov
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v2
with:
files: ./subcommands_coverage.out
flags: subcommands-coverage
name: codecov-umbrella
verbose: true

0 comments on commit 8d02eb3

Please sign in to comment.