From 98242e97ef53f0c0d2500bce28181dd3fb5597a0 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su <30667958+hjiangsu@users.noreply.github.com> Date: Thu, 11 Apr 2024 09:18:00 -0700 Subject: [PATCH] Create CI GitHub workflow --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dc108b9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: ci + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + linting: + name: Linting & Formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: subosito/flutter-action@v2 + with: + flutter-version: '3.19.x' + channel: "stable" + cache: true + cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache + cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path + architecture: x64 # optional, x64 or arm64 + + - name: Dependencies + run: flutter pub get + + - name: Linting + # We'll ignore info and warnings when performing this step + run: flutter analyze --no-fatal-infos --no-fatal-warnings + + - name: Formatting + run: dart format --set-exit-if-changed -l 200 . + + - name: Tests + run: flutter test