ci: add dartfmt lint

This commit is contained in:
Rongjian Zhang
2020-04-16 11:44:50 +08:00
parent 129505947e
commit ceb9a4654d

20
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: lint
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
container:
image: google/dart:latest
steps:
- uses: actions/checkout@v2
- run: pub get
- run: \
output=$(dartfmt --dry-run lib/**/*.dart)
if [ -z $output]
then exit 0
else
exit 1