Skip to content

Commit

Permalink
Merge pull request #3 from Starttoaster/ci
Browse files Browse the repository at this point in the history
Add code cov
  • Loading branch information
Starttoaster authored Mar 26, 2024
2 parents 012ee9a + 5a0f956 commit 2417173
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
name: Test/Lint/Fmt/Vet

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
container: golang:1
env:
GOFLAGS: "-buildvcs=false"
steps:
- name: Mark workspace safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- uses: actions/checkout@v4

- name: Build
run: go build -o /dev/null ./...

- name: Test
run: go test ./...
run: go test ./... -coverprofile=coverage.txt -covermode=atomic

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: Starttoaster/go-proxmox
files: ./coverage.txt

- name: Check gofmt changes
run: |
Expand Down

0 comments on commit 2417173

Please sign in to comment.