Skip to content

Commit 40950b3

Browse files
authored
Update GH actions (#872)
* update gh actions * change from pull_request to pull_request_target
1 parent 82d0078 commit 40950b3

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

.github/workflows/prepare.yaml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,41 @@ name: prepare
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches: [master]
7-
# don't run this workflow on version tags
8-
tags-ignore: ['v*']
9-
pull_request_target:
5+
pull_request:
106
branches: [master]
117

128
jobs:
139
main:
14-
name: Flutter ${{ matrix.channel }}${{ matrix.version }}
10+
name: Flutter ${{ matrix.flutter-version }}
1511
runs-on: ubuntu-latest
1612

1713
strategy:
1814
fail-fast: false
1915
matrix:
20-
include:
21-
- version: 3.0.0
22-
- channel: stable
16+
flutter-version: ['3.0.x', '3.3.x', '3.7.x', '3.10.x']
2317

2418
steps:
2519
- name: Clone repository
2620
uses: actions/checkout@v3
2721

28-
- name: Install Flutter
29-
uses: subosito/flutter-action@v1
22+
- name: Set up Flutter
23+
uses: subosito/flutter-action@v2
3024
with:
31-
channel: ${{ matrix.channel }}
32-
flutter-version: ${{ matrix.version }}
33-
34-
- name: Flutter version
35-
run: flutter --version
36-
37-
- name: Cache pub dependencies
38-
uses: actions/cache@v3
39-
with:
40-
path: ${{ env.FLUTTER_HOME }}/.pub-cache
41-
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
42-
restore-keys: ${{ runner.os }}-pub-
25+
flutter-version: ${{ matrix.flutter-version }}
26+
cache: true
4327

4428
- name: flutter pub get
4529
run: flutter pub get
4630

47-
- name: flutter format
48-
run: flutter format --set-exit-if-changed .
31+
- name: dart format
32+
run: dart format --set-exit-if-changed .
4933

5034
- name: flutter analyze
5135
run: flutter analyze --no-fatal-infos
5236

5337
- name: flutter test
5438
run: flutter test
5539

56-
# disabled because always fails for strange reasons
5740
- name: ktlint check
5841
working-directory: example/android
5942
run: ./gradlew flutter_downloader:ktlintCheck

0 commit comments

Comments
 (0)