Skip to content

Commit

Permalink
ci: upload test coverage to Codecov (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola authored Jan 4, 2024
1 parent 1b957b2 commit 0aee5ba
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:

- run: make test

- uses: codecov/codecov-action@v3

acceptance:
strategy:
fail-fast: false
Expand All @@ -48,6 +50,8 @@ jobs:

- run: make testacc

- uses: codecov/codecov-action@v3

example:
runs-on: ubuntu-latest

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist/*
packer-plugin-hcloud
.docs
crash.log
coverage.txt
4 changes: 2 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dev: build
mv $(BINARY) ~/.config/packer/plugins

test:
go test -race -count $(COUNT) -v $(TEST) -timeout=3m
go test -race -count $(COUNT) -v $(TEST) -timeout=3m -coverprofile=coverage.txt

install-packer-sdc: ## Install packer software development command
go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@$(HASHICORP_PACKER_PLUGIN_SDK_VERSION)
Expand All @@ -28,7 +28,7 @@ plugin-check: install-packer-sdc build
packer-sdc plugin-check $(BINARY)

testacc: build
PACKER_ACC=1 PACKER_PLUGIN_PATH=$(PWD) go test -count $(COUNT) -v $(TEST) -timeout=120m
PACKER_ACC=1 PACKER_PLUGIN_PATH=$(PWD) go test -count $(COUNT) -v $(TEST) -timeout=120m -coverprofile=coverage.txt

generate: install-packer-sdc
go generate ./...
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Packer Plugin Hcloud

[![](https://codecov.io/github/hetznercloud/packer-plugin-hcloud/graph/badge.svg?token=3NECH20DRY)](https://codecov.io/github/hetznercloud/packer-plugin-hcloud/tree/main)

The `Hcloud` multi-component plugin can be used with HashiCorp [Packer](https://www.packer.io)
to create custom images. For the full list of available features for this plugin see [docs](docs).

Expand Down

0 comments on commit 0aee5ba

Please sign in to comment.