-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure requirements.txt file exists and contains "reflex" for each ex…
…ample
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 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,29 @@ | ||
name: check-requirements | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
check-requirements: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | ||
RC=0 | ||
for f in $(ls -1); do | ||
if [[ -d $f ]]; then | ||
if [[ ! -f $f/requirements.txt ]]; then | ||
echo "$f/requirements.txt is MISSING" | ||
RC=1 | ||
continue | ||
fi | ||
if !( grep -w "^reflex" $f/requirements.txt >/dev/null 2>&1 ); then | ||
echo "$f/requirements.txt does not contain 'reflex'" | ||
RC=1 | ||
continue | ||
fi | ||
fi | ||
done | ||
exit $RC |