Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: run rules #152

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ jobs:
go test -v -covermode=count -coverprofile=coverage.out

- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.0
uses: jandelgado/gcov2lcov-action@v1
with:
infile: coverage.out
outfile: coverage.lcov

- name: Coveralls
uses: coverallsapp/github-action@v1.0.1
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
2 changes: 1 addition & 1 deletion context/context.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package context

import (
"github.com/go-bdd/gobdd"
gobdd "github.com/go-bdd/gobdd"
)

// Holds data from previously executed steps
Expand Down
40 changes: 21 additions & 19 deletions context_get.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 21 additions & 19 deletions context_get_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions features/background.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ Feature: using background steps

Scenario: the background step should be executed
Then the result should equal 3

Rule: adding and concat
Background: concat
When I concat word Hello and text " World!"

Scenario: the background steps should be executed
Then the result should equal 3
Then the result should equal text "Hello World!"
1 change: 1 addition & 0 deletions features/example.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Feature: math operations
Scenario: add two digits
When I add 1 and 2
Then the result should equal 3

6 changes: 6 additions & 0 deletions features/example_rule.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Feature: math operations
Rule: add things
Scenario: add two digits
When I add 1 and 2
Then the result should equal 3

9 changes: 9 additions & 0 deletions features/ignored_rule_tags.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

Feature: ignored tags
@ignore
Rule: this rule should be ignored
Scenario: the scenario should be ignored
Then fail the test
Rule: this rule should run
Scenario: the scenario should pass
Then the test should pass
2 changes: 2 additions & 0 deletions features/ignored_tags.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ Feature: ignored tags
@ignore
Scenario: the scenario should be ignored
Then fail the test
Scenario: the scenario should pass
Then the test should pass
13 changes: 12 additions & 1 deletion features/tags.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,15 @@ Feature: ignored tags
Then the test should pass
Examples:
Scenario: the test should never be executed
Then fail the test
Then fail the test

Rule: the rule should never be executed
Scenario: the test in ignored rule should never be executed
Then fail the test

Rule: this rule should run
@tag
Scenario: the test in executed rule should pass
Then the test should pass
Scenario: the test in executed rule should never be executed
Then fail the test
13 changes: 10 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ go 1.17

require (
github.com/cucumber/gherkin/go/v28 v28.0.0
github.com/cucumber/messages/go/v24 v24.0.1
github.com/go-bdd/assert v0.0.0-20190820124234-20d47a68475d
github.com/cucumber/messages/go/v24 v24.1.0
github.com/go-bdd/assert v0.0.0-20200713105154-236f01430281
github.com/stretchr/testify v1.9.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/stretchr/testify v1.8.4
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading