Skip to content

Commit

Permalink
Merge branch 'main' into feature/rule
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Jan 24, 2022
2 parents e19f7af + 30de46d commit 46bad15
Show file tree
Hide file tree
Showing 25 changed files with 224 additions and 1,431 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release-assets.yml
@@ -0,0 +1,44 @@
# This script uploads application binaries as GitHub release assets.
name: release-assets
on:
release:
types:
- created
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
name: Upload Release Assets
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Checkout code
uses: actions/checkout@v2
- name: Build artifacts
run: |
make artifacts
- name: Upload linux amd64 binary
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./_artifacts/godog-${{ github.event.release.tag_name }}-linux-amd64.tar.gz
asset_name: godog-${{ github.event.release.tag_name }}-linux-amd64.tar.gz
asset_content_type: application/tar+gzip
- name: Upload linux arm64 binary
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./_artifacts/godog-${{ github.event.release.tag_name }}-linux-arm64.tar.gz
asset_name: godog-${{ github.event.release.tag_name }}-linux-arm64.tar.gz
asset_content_type: application/tar+gzip
- name: Upload darwin amd64 binary
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./_artifacts/godog-${{ github.event.release.tag_name }}-darwin-amd64.tar.gz
asset_name: godog-${{ github.event.release.tag_name }}-darwin-amd64.tar.gz
asset_content_type: application/tar+gzip
44 changes: 37 additions & 7 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,34 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt

---

## [v0.12.4]

### Added

- Allow suite-level configuration of steps and hooks ([453](https://github.com/cucumber/godog/pull/453) - [vearutop])

## Changed

- Run scenarios in the same goroutine if concurrency is disabled (([453](https://github.com/cucumber/godog/pull/453) - [vearutop]))


## [v0.12.3]

### Added

- Automated binary releases with GitHub Actions ([437](https://github.com/cucumber/godog/pull/437) - [vearutop])
- Automated binary versioning with `go install` ([437](https://github.com/cucumber/godog/pull/437) - [vearutop])
- Module with local replace in examples ([437](https://github.com/cucumber/godog/pull/437) - [vearutop])

### Changed

- suggest to use `go install` instead of the deprecated `go get` to install the `godog` binary ([449](https://github.com/cucumber/godog/pull/449) - [dmitris](https://github.com/dmitris))

### Fixed

- After Scenario hook is called before After Step ([444](https://github.com/cucumber/godog/pull/444) - [vearutop])
- `check-go-version` in Makefile to run on WSL. ([443](https://github.com/cucumber/godog/pull/443) - [mxygem])

## [v0.12.2]

### Fixed
Expand Down Expand Up @@ -146,8 +174,8 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt

### Changed

- Run godog features in CircleCI in strict mode ([jaysonesmith])
- Removed TestMain call in `suite_test.go` for CI. ([jaysonesmith])
- Run godog features in CircleCI in strict mode ([mxygem])
- Removed TestMain call in `suite_test.go` for CI. ([mxygem])
- Migrated to [gherkin-go - v11.0.0](https://github.com/cucumber/gherkin-go/releases/tag/v11.0.0). ([240](https://github.com/cucumber/godog/pull/240) - [lonnblad])

### Deprecated
Expand All @@ -158,7 +186,7 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt

- Fixed the time attributes in the JUnit formatter. ([232](https://github.com/cucumber/godog/pull/232) - [lonnblad])
- Re enable custom formatters. ([238](https://github.com/cucumber/godog/pull/238) - [ericmcbride])
- Added back suite_test.go ([jaysonesmith])
- Added back suite_test.go ([mxygem])
- Normalise module paths for use on Windows ([242](https://github.com/cucumber/godog/pull/242) - [gjtaylor])
- Fixed panic in indenting function `s` ([247](https://github.com/cucumber/godog/pull/247) - [titouanfreville])
- Fixed wrong version in API example ([263](https://github.com/cucumber/godog/pull/263) - [denis-trofimov])
Expand All @@ -181,18 +209,18 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
### Fixed

- Find/Replaced references to DATA-DOG/godog -> cucumber/godog for docs. ([209](https://github.com/cucumber/godog/pull/209) - [smikulcik])
- Fixed missing links in changelog to be correctly included! ([jaysonesmith])
- Fixed missing links in changelog to be correctly included! ([mxygem])

## [0.8.0]

### Added

- Added initial CircleCI config. ([jaysonesmith])
- Added initial CircleCI config. ([mxygem])
- Added concurrency support for JUnit formatting ([lonnblad])

### Changed

- Changed code references to DATA-DOG/godog to cucumber/godog to help get things building correctly. ([jaysonesmith])
- Changed code references to DATA-DOG/godog to cucumber/godog to help get things building correctly. ([mxygem])

### Deprecated

Expand All @@ -202,6 +230,8 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt

<!-- Releases -->

[v0.12.4]: https://github.com/cucumber/godog/compare/v0.12.3...v0.12.4
[v0.12.3]: https://github.com/cucumber/godog/compare/v0.12.2...v0.12.3
[v0.12.2]: https://github.com/cucumber/godog/compare/v0.12.1...v0.12.2
[v0.12.1]: https://github.com/cucumber/godog/compare/v0.12.0...v0.12.1
[v0.12.0]: https://github.com/cucumber/godog/compare/v0.11.0...v0.12.0
Expand All @@ -214,7 +244,7 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
<!-- Contributors -->

[axw]: https://github.com/axw
[jaysonesmith]: https://github.com/jaysonesmith
[mxygem]: https://github.com/mxygem
[lonnblad]: https://github.com/lonnblad
[smikulcik]: https://github.com/smikulcik
[ericmcbride]: https://github.com/ericmcbride
Expand Down
8 changes: 5 additions & 3 deletions Makefile
@@ -1,10 +1,12 @@
.PHONY: test gherkin bump cover

VERS := $(shell grep 'const Version' -m 1 godog.go | awk -F\" '{print $$2}')
VERS ?= $(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)

FOUND_GO_VERSION := $(shell go version)
EXPECTED_GO_VERSION = 1.17
.PHONY: check-go-version
check-go-version:
@[[ "$(shell go version)" =~ $(EXPECTED_GO_VERSION) ]] || (echo Wrong go version! Please install $(EXPECTED_GO_VERSION) && exit 1)
@$(if $(findstring ${EXPECTED_GO_VERSION}, ${FOUND_GO_VERSION}),(exit 0),(echo Wrong go version! Please install ${EXPECTED_GO_VERSION}; exit 1))

test: check-go-version
@echo "running all tests"
Expand Down Expand Up @@ -56,7 +58,7 @@ artifacts:

define _build
mkdir $(ARTIFACT_DIR)/godog-$(VERS)-$1-$2
env GOOS=$1 GOARCH=$2 go build -o $(ARTIFACT_DIR)/godog-$(VERS)-$1-$2/godog ./cmd/godog
env GOOS=$1 GOARCH=$2 go build -ldflags "-X github.com/cucumber/godog.Version=$(VERS)" -o $(ARTIFACT_DIR)/godog-$(VERS)-$1-$2/godog ./cmd/godog
cp README.md $(ARTIFACT_DIR)/godog-$(VERS)-$1-$2/README.md
cp LICENSE $(ARTIFACT_DIR)/godog-$(VERS)-$1-$2/LICENSE
cd $(ARTIFACT_DIR) && tar -c --use-compress-program="pigz --fast" -f godog-$(VERS)-$1-$2.tar.gz godog-$(VERS)-$1-$2 && cd ..
Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -45,10 +45,11 @@ When automated testing is this much fun, teams can easily protect themselves fro

## Install
```
go get github.com/cucumber/godog/cmd/godog@v0.12.0
go install github.com/cucumber/godog/cmd/godog@v0.12.0
```
Adding `@v0.12.0` will install v0.12.0 specifically instead of master.

With `go` version prior to 1.17, use `go get github.com/cucumber/godog/cmd/godog@v0.12.0`.
Running `within the $GOPATH`, you would also need to set `GO111MODULE=on`, like this:
```
GO111MODULE=on go get github.com/cucumber/godog/cmd/godog@v0.12.0
Expand Down Expand Up @@ -243,7 +244,7 @@ godogs
- godogs_test.go
```

#### Step 6 - Add some logic to the step defintions
#### Step 6 - Add some logic to the step definitions

Now lets implement our step definitions to test our feature requirements:

Expand Down Expand Up @@ -603,4 +604,4 @@ A simple example can be [found here](/_examples/custom-formatter).
[cucumber]: https://cucumber.io/ "Behavior driven development framework"
[license]: https://en.wikipedia.org/wiki/MIT_License "The MIT license"
[contributing guide]: https://github.com/cucumber/godog/blob/main/CONTRIBUTING.md
[community Slack]: https://cucumber.io/community#slack
[community Slack]: https://cucumber.io/community#slack
2 changes: 1 addition & 1 deletion _examples/api/features/version.feature
Expand Up @@ -20,6 +20,6 @@ Feature: get version
And the response should match json:
"""
{
"version": "v0.11.0"
"version": "v0.0.0-dev"
}
"""
5 changes: 0 additions & 5 deletions _examples/api/go.mod

This file was deleted.

0 comments on commit 46bad15

Please sign in to comment.