This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added quality check workflow (#2)
- Loading branch information
1 parent
ef74f70
commit e5df7b0
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Check source code quality | ||
|
||
on: | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
lint: | ||
name: Check lints | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- run: flutter --version | ||
|
||
# Check for any formatting issues in the code. | ||
- name: Verify formatting | ||
run: dart format --set-exit-if-changed . | ||
|
||
analyze: | ||
name: Check code analysis | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- run: flutter --version | ||
|
||
# Get flutter dependencies. | ||
- name: Install dependencies | ||
run: flutter pub get | ||
|
||
# Statically analyze the Dart code for any errors. | ||
- name: Analyze project source | ||
run: flutter analyze . |