-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9da7ce5
commit 81fd66c
Showing
4 changed files
with
40 additions
and
25 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,26 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install flutter | ||
uses: subosito/flutter-action@v1 | ||
with: | ||
channel: stable | ||
- name: Install packages | ||
run: flutter pub get | ||
- name: Check format | ||
run: ./scripts/format.sh . | ||
- name: Test | ||
run: flutter test |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
function run_format() { | ||
output=$(flutter format --set-exit-if-changed -n .) | ||
if [ $? -eq 1 ]; then | ||
echo "flutter format issues on" | ||
echo $output | ||
exit 1 | ||
fi | ||
} | ||
|
||
cd $1 || exit | ||
|
||
run_format |