-
-
Notifications
You must be signed in to change notification settings - Fork 42
48 lines (39 loc) · 1.26 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build and test
on:
push:
jobs:
build:
name: Build and test
runs-on: macos-latest
steps:
- name: Get repository
uses: actions/checkout@v4
- name: Configure enviroment
env:
ENV_PROD_BASE64: ${{ secrets.ENV_PROD_BASE64 }}
ENV_DEV_BASE64: ${{ secrets.ENV_DEV_BASE64 }}
run: |
echo $ENV_PROD_BASE64 | base64 --decode > .env/prod.json
echo $ENV_DEV_BASE64 | base64 --decode > .env/dev.json
- name: Get flutter version
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: '.fvmrc'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
cache: true
cache-key: 'flutter-:os:-:version:-:arch:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
- name: Show flutter info
run: flutter doctor
- name: Install dependencies
run: sh tool/setup.sh
- name: Verify formated files
run: dart format $(find . -name "*.dart" -not -wholename "**/*.g.dart") --set-exit-if-changed
- name: Analyze code
run: flutter analyze
- name: Test
run: sh tool/unit-test.sh prod