Skip to content

Commit

Permalink
Create CI GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hjiangsu authored Apr 11, 2024
1 parent 59ac76b commit 98242e9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 98242e9

Please sign in to comment.