Skip to content

Commit

Permalink
Optimize workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
quoc-huynh-cosee committed Nov 2, 2023
1 parent 333bb1a commit 4d24b71
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@ name: responsive_notebook_background
on: [ push ]

jobs:
lint:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/[email protected]

- name: Install Dependencies
- name: Cache dependencies
uses: actions/cache@v3
id: cache
with:
path: |
.dart_tool/
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/pubspec.lock') }}
- name: Install dependencies
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Code metrics
run: dart run dart_code_metrics:metrics analyze . --set-exit-on-violation-level=warning --disable-sunset-warning

style_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/[email protected]

- name: Install Dependencies
run: flutter pub get
- name: Format
- name: Format code
run: dart format --set-exit-if-changed .
- name: Analyze code
run: flutter analyze
- name: Run code metrics
run: dart run dart_code_metrics:metrics analyze . --set-exit-on-violation-level=warning --disable-sunset-warning

pana:
runs-on: ubuntu-latest
Expand All @@ -37,9 +36,17 @@ jobs:
run: |
sudo apt update
sudo apt install webp
- name: Cache dependencies
uses: actions/cache@v3
id: cache
with:
path: |
.dart_tool/
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/pubspec.lock') }}
- name: Install Dependencies
run: |
flutter pub get
flutter pub global activate pana
- name: Verify Pub Score
run: ./tool/verify_pub_score.sh

0 comments on commit 4d24b71

Please sign in to comment.