-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add a workflow for tracking
@todo-
s (#673)
* Add a script and workflow for tracking `@todo-`s * [REVERT THIS] Test out the script * Add name to the workflow * Revert "[REVERT THIS] Test out the script" This reverts commit 4789bf9. * No longer test @todo-framework
- Loading branch information
Showing
3 changed files
with
37 additions
and
3 deletions.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
# total number of .feature files that has unresolved @todo-tags | ||
nTodoFiles=$(grep -R -e "@todo-*" ./packages/e2e/features/ -l | wc -l | sed -e 's/^[ \t]*//'); | ||
|
||
red="\033[0;31m" | ||
nocolor="\033[0m" | ||
|
||
if [ ${nTodoFiles} -gt 0 ]; then | ||
echo "\n---------" | ||
echo "ERROR: There are ${red}${nTodoFiles}${nocolor} feature files with @todo tags." | ||
echo "---------" | ||
|
||
grep -RIci "@todo-" ./packages/e2e/features/ | awk -v FS=":" '$2>0 { print $1, "has", $2, "@todo tags." }'; | ||
echo "\n" | ||
exit 1; | ||
else | ||
echo "🎉 No @todo tags were found." | ||
fi |
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,15 @@ | ||
name: Track @TODOs | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
environment: ci | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Track TODOs | ||
run: chmod +x ./.github/scripts/track-todos.sh && ./.github/scripts/track-todos.sh |