Skip to content

Commit

Permalink
👷 Add CI
Browse files Browse the repository at this point in the history
Contains workflows for formatting check, static analysis and build
  • Loading branch information
schaerfo committed Oct 24, 2023
1 parent 0e6036a commit 0ec2d4b
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Analyze

on:
push:
branches: [ '*' ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.x'
channel: 'stable'
cache: true

- name: Check Flutter version
run: flutter --version

- name: Install dependencies
run: flutter pub get

- name: Analyze project source
run: flutter analyze
26 changes: 26 additions & 0 deletions .github/workflows/build-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build APK

on:
push:
branches: [ '*' ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.x'
channel: 'stable'
cache: true

- name: Check Flutter version
run: flutter --version

- name: Install dependencies
run: flutter pub get

- name: Build APK
run: flutter build apk
23 changes: 23 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Formatting

on:
push:
branches: [ '*' ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.x'
channel: 'stable'
cache: true

- name: Check Flutter version
run: flutter --version

- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
Expand Down

0 comments on commit 0ec2d4b

Please sign in to comment.