Skip to content

Commit

Permalink
Add a ginkgo focus check linter (#252)
Browse files Browse the repository at this point in the history
* Add GH action to run on pull request whenever there is focused check in the PR

Signed-off-by: Parthvi Vala <[email protected]>

Add focus for testing

Signed-off-by: Parthvi Vala <[email protected]>

Newline

Signed-off-by: Parthvi Vala <[email protected]>

Revert "Add focus for testing"

This reverts commit 147732c.

Update .github/workflows/focus-ginkgo-checks.yml

Co-authored-by: Martin Kravec <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>

Fix action not failing on a successful grep

Signed-off-by: Parthvi Vala <[email protected]>

Add focus for testing

Signed-off-by: Parthvi Vala <[email protected]>

Revert "Add focus for testing"

This reverts commit 492eb03.

Update .github/workflows/focus-ginkgo-checks.yml

Co-authored-by: Tomas Hehejik <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>

Revert "Revert "Add focus for testing""

This reverts commit 1fdc623.

Update .github/workflows/focus-ginkgo-checks.yml

Co-authored-by: Tomas Hehejik <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>

Revert "Revert "Revert "Add focus for testing"""

This reverts commit a137238.

Remove script and other minor modifications

Signed-off-by: Parthvi Vala <[email protected]>

* Fix: trigger action on PR edit

Signed-off-by: Parthvi Vala <[email protected]>

* Update .github/workflows/focus-ginkgo-checks.yml

Co-authored-by: Tomas Hehejik <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>

---------

Signed-off-by: Parthvi Vala <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>
Co-authored-by: Tomas Hehejik <[email protected]>
  • Loading branch information
valaparthvi and thehejik authored Feb 10, 2025
1 parent 2acafc0 commit 1e43168
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/focus-ginkgo-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Checking for focused specs

on:
pull_request:
branches: [ main ]
paths:
- '**.go'

jobs:
check-focus-target:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Running the focus check script
run: |
grep -ErnI --include="*.go" 'FIt|FDescribe|FContext|FWhen|FEntry|FDescribeTable' ./hosted && { echo "There are focused specs, please remove them."; exit 1; } || { echo "No focused specs found."; exit 0; }

0 comments on commit 1e43168

Please sign in to comment.