-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement gherkin linter in GH action
- Loading branch information
1 parent
cf7bfa5
commit 09dcf18
Showing
5 changed files
with
76 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ tests | |
.distignore | ||
.editorconfig | ||
.eslintrc.js | ||
.gherkin-lintrc | ||
.gitattributes | ||
.gitignore | ||
.nvmrc | ||
|
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,26 @@ | ||
{ | ||
"indentation": [ | ||
"on", | ||
{ | ||
"Feature": 0, | ||
"Background": 2, | ||
"Scenario": 2, | ||
"Examples": 4, | ||
"Step": 4, | ||
"given": 4, | ||
"example": 6, | ||
"and": 4 | ||
} | ||
], | ||
"no-dupe-feature-names": "on", | ||
"no-dupe-scenario-names": "off", | ||
"no-empty-file": "on", | ||
"no-files-without-scenarios": "on", | ||
"no-multiple-empty-lines": "on", | ||
"no-partially-commented-tag-lines": "on", | ||
"no-trailing-spaces": "on", | ||
"no-unnamed-features": "on", | ||
"no-unnamed-scenarios": "on", | ||
"no-scenario-outlines-without-examples": "on", | ||
"use-and": "on" | ||
} |
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
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,46 @@ | ||
name: Gherkin Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
- 'release/**' | ||
# Only run if PHP-related files changed. | ||
paths: | ||
- '.github/workflows/behat-test.yml' | ||
- '**.php' | ||
- '**.feature' | ||
- 'behat.yml' | ||
- 'composer.json' | ||
- 'composer.lock' | ||
pull_request: | ||
branches: | ||
- trunk | ||
- 'release/**' | ||
- 'feature/**' | ||
# Only run if PHP-related files changed. | ||
paths: | ||
- '.github/workflows/behat-test.yml' | ||
- '**.php' | ||
- '**.feature' | ||
- 'behat.yml' | ||
- 'composer.json' | ||
- 'composer.lock' | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
gherkin-lint: | ||
name: Lint Gherkin Feature files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
|
||
- name: Run lint | ||
run: npx --yes gherkin-lint |
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