Existing examples #6
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
name: Check Files | |
on: | |
pull_request: | |
paths: | |
- "**.py" | |
jobs: | |
check_files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v2 | |
- name: Check files | |
run: | | |
#!/bin/bash | |
set -e | |
for dir in $(find ./* -type d); do | |
if [ ! -f "$dir/app-core.py" ]; then | |
echo "app-core.py must be in each folder, but it's missing in $dir" | |
exit 1 | |
fi | |
if [ -f "$dir/app.py" ]; then | |
echo "app.py should not be in any folder, but it's found in $dir" | |
exit 1 | |
fi | |
done |