-
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.
Merge pull request #754 from WordPress/implement-gherkin-linter
Implement gherkin linter in GH action
- Loading branch information
Showing
8 changed files
with
598 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
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,2 @@ | ||
node_modules/** | ||
vendor/** |
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,32 @@ | ||
{ | ||
"file-name": [ | ||
"on", | ||
{ | ||
"style": "kebab-case" | ||
} | ||
], | ||
"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 feature files are changed. | ||
paths: | ||
- '.github/workflows/gherkin-lint.yml' | ||
- 'package-lock.json' | ||
- '**.feature' | ||
pull_request: | ||
branches: | ||
- trunk | ||
- 'release/**' | ||
- 'feature/**' | ||
# Only run if feature files are changed. | ||
paths: | ||
- '.github/workflows/gherkin-lint.yml' | ||
- 'package-lock.json' | ||
- '**.feature' | ||
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 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Gherkin lint | ||
run: npm run lint-gherkin |
Oops, something went wrong.