55 types : [opened, reopenned, ready_for_review, edited, synchronize]
66 branches : [main]
77
8+ env :
9+ FLUTTER_VERSION : " 3.0.5"
10+ JAVA_VERSION : " 12.x"
11+
812jobs :
913 prepare :
1014 runs-on : ubuntu-latest
@@ -15,28 +19,28 @@ jobs:
1519
1620 - name : cache node_modules
1721 id : cache-node-modules
18- uses : actions/cache@v2
22+ uses : actions/cache@v3
1923 with :
2024 path : ' **/node_modules'
2125 key : ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
2226
23- - name : Use Node ${{ matrix.node-version }}
24- uses : actions/setup-node@v1
27+ - name : Use Node 16
28+ uses : actions/setup-node@v3
2529 with :
26- node-version : ${{ matrix.node-version }}
27-
28- - run : git fetch --no-tags --prune --depth=5 origin main
30+ node-version : 16
2931
3032 - name : Install deps
3133 if : steps.cache-node-modules.cache-hit != 'true'
3234 run : npm install
3335
34- - name : Install Flutter
35- uses : subosito/flutter-action@v2
36+ - name : Cache Flutter dependencies
37+ uses : actions/cache@v3
3638 with :
37- channel : ' stable'
38- cache-key : ${{ runner.os }}-flutter
39- architecture : x64
39+ path : /opt/hostedtoolcache/flutter
40+ key : ${{ runner.OS }}-flutter-install-cache-${{ env.FLUTTER_VERSION }}
41+ - uses : subosito/flutter-action@v2
42+ with :
43+ flutter-version : ${{ env.FLUTTER_VERSION }}
4044 - run : flutter --version
4145
4246 analyze :
@@ -48,21 +52,23 @@ jobs:
4852 fetch-depth : 0
4953
5054 - name : cache node_modules
51- uses : actions/cache@v2
55+ uses : actions/cache@v3
5256 with :
5357 path : ' **/node_modules'
5458 key : ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
5559
5660 - name : Cache Flutter dependencies
57- uses : actions/cache@v2
61+ uses : actions/cache@v3
5862 with :
5963 path : /opt/hostedtoolcache/flutter
60- key : ${{ runner.os }}-flutter
64+ key : ${{ runner.OS }}-flutter-install-cache-${{ env.FLUTTER_VERSION }}
6165 - uses : subosito/flutter-action@v2
6266 with :
63- channel : ' stable'
67+ flutter-version : ${{ env.FLUTTER_VERSION }}
68+
6469 - name : Flutter analyze
6570 run : npx nx run-many --target=analyze --all=true
71+
6672 - name : Flutter format
6773 run : npx nx run-many --target=format --all=true
6874
@@ -75,18 +81,19 @@ jobs:
7581 fetch-depth : 0
7682
7783 - name : cache node_modules
78- uses : actions/cache@v2
84+ uses : actions/cache@v3
7985 with :
8086 path : ' **/node_modules'
8187 key : ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
8288
8389 - name : Cache Flutter dependencies
84- uses : actions/cache@v2
90+ uses : actions/cache@v3
8591 with :
8692 path : /opt/hostedtoolcache/flutter
87- key : ${{ runner.os }}-flutter
93+ key : ${{ runner.OS }}-flutter-install-cache-${{ env.FLUTTER_VERSION }}
8894 - uses : subosito/flutter-action@v2
8995 with :
90- channel : ' stable'
96+ flutter-version : ${{ env.FLUTTER_VERSION }}
97+
9198 - name : Flutter test
92- run : npx nx run-many --target=test --all=true --exclude= flutter-api,flutter-episodes,flutter-characters,flutter-suflex,flutter-splash
99+ run : npx nx run flutter-shared:test
0 commit comments