Skip to content

Commit

Permalink
ci: Cache .dart_tool directory
Browse files Browse the repository at this point in the history
Speeds up `build_runner` executions.
  • Loading branch information
Mr-Pepe committed Jan 9, 2024
1 parent 0482b2a commit 10670f4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,21 @@ jobs:
channel: 'stable'
cache: true

- name: Restore Dart cache
id: restore-dart-cache
uses: actions/cache/restore@v3
with:
path: .dart_tool
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}-

- run: flutter pub get
- run: dart format --set-exit-if-changed .
- run: dart run build_runner build # Generate mocks
- run: flutter analyze .
- run: flutter test

- name: Save Dart cache
uses: actions/cache/save@v3
with:
path: .dart_tool
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}-${{ github.run_id }}

0 comments on commit 10670f4

Please sign in to comment.