Skip to content

Commit

Permalink
chore: CI: flag Lean modules importing Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Feb 22, 2024
1 parent 1d66c32 commit 6eca765
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,28 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# checks that each `Lean` module contains a `prelude` line
check-prelude:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: src/Lean
- name: Check Prelude
run: |

Check failure on line 483 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC2006:style:8:50: Use $(...) notation instead of legacy backticks `...`
failed_files=""
while IFS= read -r -d '' file; do
if ! grep -q "^prelude$" "$file"; then
failed_files="$failed_files$file\n"
fi
done < <(find src/Lean -type f -print0)
if [ -n "$failed_files" ]; then
echo -e "The following files should not import `Init`:\n$failed_files"
exit 1
fi
# This job creates nightly releases during the cron job.
# It is responsible for creating the tag, and automatically generating a changelog.
release-nightly:
Expand Down

0 comments on commit 6eca765

Please sign in to comment.