-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add github actions #9 * Update steps * Fig coverage flags * Exclude examples from coverage
- Loading branch information
Showing
7 changed files
with
152 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: check-gherkingen | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.17.8' | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Lint | ||
run: make lint | ||
|
||
- name: Check generate | ||
run: make check.generate | ||
|
||
- name: Test | ||
run: make test | ||
|
||
- uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: release-gherkingen | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.17.8' | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm/v6,linux/386 | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/gherkingen:latest,${{ secrets.DOCKERHUB_USERNAME }}/gherkingen:${{ steps.vars.outputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
build: | ||
binary: gherkingen | ||
main: ./cmd/gherkingen | ||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- "386" | ||
- amd64 | ||
- arm | ||
- arm64 | ||
goarm: | ||
- "6" | ||
ignore: | ||
- goos: darwin | ||
goarch: "386" | ||
env: | ||
- CGO_ENABLED=0 | ||
|
||
gomod: | ||
proxy: true | ||
|
||
archives: | ||
- name_template: "{{.Binary}}_{{.Os}}_{{.Arch}}" | ||
files: | ||
- README.md | ||
- LICENSE | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
release: | ||
draft: true | ||
|
||
snapshot: | ||
name_template: "{{.Tag}}" | ||
|
||
checksum: | ||
name_template: "task_checksums.txt" | ||
|
||
nfpms: | ||
- vendor: Task | ||
homepage: https://github.com/hedhyw/gherkingen | ||
maintainer: Maksym Kryvchun <[email protected]> | ||
description: BDD tests boilerplate generator for Golang | ||
license: MIT | ||
formats: | ||
- deb | ||
- rpm | ||
file_name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}" | ||
|
||
brews: | ||
- name: gherkingen | ||
description: BDD tests boilerplate generator for Golang | ||
license: MIT | ||
homepage: https://github.com/hedhyw/gherkingen | ||
folder: Formula | ||
tap: | ||
owner: hedhyw | ||
name: homebrew-tap | ||
test: system "#{bin}/gherkingen", "-help" | ||
install: |- | ||
bin.install "gherkingen" |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.