Skip to content

Commit

Permalink
update CI scripts (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo authored Sep 17, 2021
1 parent 9da7ce5 commit 81fd66c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 25 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
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
19 changes: 0 additions & 19 deletions .github/workflows/test.yml

This file was deleted.

6 changes: 0 additions & 6 deletions format.sh

This file was deleted.

14 changes: 14 additions & 0 deletions scripts/format.sh
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

0 comments on commit 81fd66c

Please sign in to comment.