Skip to content

Commit

Permalink
ci: add pr check
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Jan 18, 2024
1 parent 3ce2f29 commit 5f54048
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR check

on:
pull_request:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Check
run: |
flutter pub get
dart fix
dart format .
git diff --exit-code
if [ $? -eq 0 ]; then
echo "No formatting changes detected"
else
echo "Formatting changes detected. Run `make format` to fix it."
exit 1
fi

0 comments on commit 5f54048

Please sign in to comment.