-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (47 loc) · 1.5 KB
/
lockpick.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
name: lockpick
on:
pull_request:
paths:
- '.github/workflows/lockpick.yaml'
- 'lib/**'
- 'test/**'
- 'pubspec.yaml'
jobs:
build:
runs-on: ubuntu-latest
container:
image: dart:3.0.5
steps:
- uses: actions/[email protected]
- name: Install Dependencies
run: dart pub get
- name: Format
run: dart format --set-exit-if-changed lib test
- name: Analyze
run: dart analyze --fatal-infos --fatal-warnings .
- name: Run tests
run: dart test --chain-stack-traces --coverage=coverage && dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
# - name: Check Code Coverage
# uses: VeryGoodOpenSource/[email protected]
# with:
# path: coverage/lcov.info
# exclude: '**/*.g.dart **/*.gen.dart'
pana:
runs-on: ubuntu-latest
container:
image: dart:3.0.5
steps:
- uses: actions/[email protected]
- name: Install Dependencies
run: |
dart pub get
dart pub global activate pana 0.21.34
- name: Verify Pub Score
run: |
echo "Running pana..."
PANA=$(dart pub global run pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
echo "Done. Score: $PANA_SCORE"
if [[ $PANA_SCORE != "130/130" ]]; then
echo "Pana score is not 130/130. Failing build."
exit 1
fi