-
-
Notifications
You must be signed in to change notification settings - Fork 956
70 lines (61 loc) · 1.72 KB
/
riverpod_lint.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
name: Riverpod lint tests
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches:
- master
- dev
paths-ignore:
- "**.md"
schedule:
# runs the CI everyday at 10AM
- cron: "0 10 * * *"
jobs:
riverpod_lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.package_path }}
strategy:
matrix:
channel:
- master
package_path:
- packages/riverpod_analyzer_utils
- packages/riverpod_analyzer_utils_tests
- packages/riverpod_lint
- packages/riverpod_lint_flutter_test
steps:
- uses: actions/[email protected]
with:
fetch-depth: 2
- uses: subosito/[email protected]
with:
channel: ${{ matrix.channel }}
- name: Add pub cache bin to PATH
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
- name: Add pub cache to PATH
run: echo "PUB_CACHE="$HOME/.pub-cache"" >> $GITHUB_ENV
- name: Install dependencies
run: flutter pub get
- run: dart pub global activate custom_lint
- name: Check format
run: dart format --set-exit-if-changed .
- name: Analyze
run: flutter analyze
- name: Run custom_lint
run: custom_lint
# Workaround to https://github.com/invertase/dart_custom_lint/issues/77
if: matrix.package_path == 'packages/riverpod_lint_flutter_test'
- name: Run tests
run: |
if test -d "test"; then
${{github.workspace}}/scripts/coverage.sh
fi
- name: Upload coverage to codecov
run: |
if test -d "test"; then
curl -s https://codecov.io/bash | bash
fi