-
-
Notifications
You must be signed in to change notification settings - Fork 99
100 lines (77 loc) · 2.23 KB
/
mason_cli.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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: mason_cli
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
paths:
- .github/workflows/mason_cli.yaml
- packages/mason_logger/**
- packages/mason_api/**
- packages/mason/**
- packages/mason_cli/**
pull_request:
branches:
- master
paths:
- .github/workflows/mason_cli.yaml
- packages/mason_logger/**
- packages/mason_api/**
- packages/mason/**
- packages/mason_cli/**
jobs:
setup:
defaults:
run:
working-directory: packages/mason_cli
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: dart-lang/setup-dart@v1
- name: Install Dependencies
run: dart pub get
- name: Format
run: dart format --set-exit-if-changed lib
- name: Analyze
run: dart analyze --fatal-infos --fatal-warnings .
- name: Ensure Build
run: dart test --run-skipped -t pull-request-only
build:
needs: setup
defaults:
run:
working-directory: packages/mason_cli
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-2019, ubuntu-latest]
steps:
- uses: actions/[email protected]
- uses: dart-lang/setup-dart@v1
- name: Install Dependencies
run: dart pub get
- name: Run Tests
run: |
dart pub global activate coverage 1.2.0
dart test -j 1 -x pull-request-only --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
- name: Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
with:
path: packages/mason_cli/coverage/lcov.info
pana:
defaults:
run:
working-directory: packages/mason_cli
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: dart-lang/setup-dart@v1
- name: Install Dependencies
run: |
dart pub get
dart pub global activate pana
- name: Verify Pub Score
run: ../../tool/verify_pub_score.sh