-
Notifications
You must be signed in to change notification settings - Fork 41
74 lines (69 loc) · 2.19 KB
/
test.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Tests and analysis
on: [ push ]
jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
id: flutter-action
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: ${{ inputs.cache }}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.yaml') }}
- name: Install dependencies
run: flutter pub get
- name: Run tests
run: flutter test
analyze_code:
name: Analyze code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
id: flutter-action
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: ${{ inputs.cache }}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.yaml') }}
- name: Install dependencies
run: flutter pub get
- name: Flutter analyze
run: flutter analyze
calculate_score:
name: Calculate score
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
id: flutter-action
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: ${{ inputs.cache }}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.yaml') }}
- name: Install dependencies
run: flutter pub get
- name: Install pana
run: flutter pub global activate pana
- name: Calculate pub points
run: flutter pub pub global run pana --exit-code-threshold 0 .
test_publishing:
name: Test publishing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
id: flutter-action
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: ${{ inputs.cache }}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.yaml') }}
- name: Install dependencies
run: flutter pub get
- name: Flutter publish dry run
run: flutter pub publish --dry-run