Skip to content

Commit

Permalink
ci: cache files
Browse files Browse the repository at this point in the history
Rather than uploading as an artifact, we now cache the files.
Should fix ci.
  • Loading branch information
lishaduck committed Dec 14, 2023
1 parent 314f3d1 commit 0461652
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 30 deletions.
85 changes: 56 additions & 29 deletions .github/workflows/dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,6 @@ jobs:
run: |
flutter gen-l10n
dart run build_runner build -d
- name: ⚙️ Upload generated files
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: generated-files
path: |
lib/gen/*.gen.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
if-no-files-found: error
build:
name: Build
Expand Down Expand Up @@ -138,11 +123,25 @@ jobs:
run: flutter --disable-analytics
- name: 📦 Install dependencies
run: flutter pub get
- name: ⚙️ Download generated code
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
- name: ⚙️ Cache generated files
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
name: generated-files
path: lib
path: |
.dart_tool/
lib/gen/*.gen.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
key: ${{ runner.os }}-${{ env.FLUTTER_CHANNEL }}-dart-${{ hashFiles('**/build.yaml') }}
- name: 🔌 Generate files
run: |
flutter gen-l10n
dart run build_runner build -d
- name: 🔧 Build
run: |
flutter build ${{ matrix.target }} ${{ matrix.flutter-flags }}
Expand Down Expand Up @@ -178,15 +177,29 @@ jobs:
run: flutter --disable-analytics
- name: 📦 Install dependencies
run: flutter pub get
- name: ⚙️ Download generated code
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
- name: ⚙️ Cache generated files
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
name: generated-files
path: lib
path: |
.dart_tool/
lib/gen/*.gen.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
key: ${{ runner.os }}-${{ env.FLUTTER_CHANNEL }}-dart-${{ hashFiles('**/build.yaml') }}
- name: 🔌 Generate files
run: |
flutter gen-l10n
dart run build_runner build -d
- name: 🕵️ Analyze project source
run: flutter analyze --fatal-infos
- name: 🕵️ Lint Riverpod
run: dart run custom_lint
- name: 🕵️ Run Custom Lint Rules
run: dart run custom_lint --fatal-infos

test:
name: Testing
Expand All @@ -212,11 +225,25 @@ jobs:
run: flutter --disable-analytics
- name: 📦 Install dependencies
run: flutter pub get
- name: ⚙️ Download generated code
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
- name: ⚙️ Cache generated files
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
name: generated-files
path: lib
path: |
.dart_tool/
lib/gen/*.gen.dart
lib/features/**/*.g.dart
lib/features/**/*.freezed.dart
lib/utils/*.g.dart
lib/utils/*.freezed.dart
lib/app/*.gr.dart
lib/app/*.gm.dart
lib/l10n/app_localizations.dart
lib/l10n/app_localizations_*.dart
key: ${{ runner.os }}-${{ env.FLUTTER_CHANNEL }}-dart-${{ hashFiles('**/build.yaml') }}
- name: 🔌 Generate files
run: |
flutter gen-l10n
dart run build_runner build -d
- name: 🧪 Run tests
run: dart run very_good_cli:very_good test --coverage --test-randomize-ordering-seed random
- name: 📊 Check code coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
clean: true
persist-credentials: false
set-safe-directory: true
- name: 🪄 Markdown linting
- name: 🕵️ Markdown linting
uses: DavidAnson/markdownlint-cli2-action@455b6612a7b7a80f28be9e019b70abdd11696e4e # v14.0.0
id: markdownlint
with:
Expand Down

0 comments on commit 0461652

Please sign in to comment.