-
-
Notifications
You must be signed in to change notification settings - Fork 193
73 lines (58 loc) · 1.83 KB
/
functions_client.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
name: functions_client
on:
push:
branches:
- main
paths:
- 'packages/functions_client/**'
- '.github/workflows/functions_client.yml'
- 'packages/yet_another_json_isolate/**'
pull_request:
paths:
- 'packages/functions_client/**'
- '.github/workflows/functions_client.yml'
- 'packages/yet_another_json_isolate/**'
jobs:
test:
name: Test SDK ${{ matrix.sdk }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [stable, beta, dev]
defaults:
run:
working-directory: packages/functions_client
runs-on: ${{ matrix.os }}
steps:
- name: Checks-out repo
uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Bootstrap workspace
run: |
cd ../../
dart pub global activate melos
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
run: dart format lib test -l 80 --set-exit-if-changed
- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .
- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze
- name: Run tests
run: dart test --coverage=./coverage
- name: Format coverage
run: |
dart pub global activate coverage
dart pub global run coverage:format_coverage --lcov --in="./coverage/test" --out="./coverage/lcov.info" --report-on="./lib"
- name: Upload coverage results to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/functions_client/coverage/lcov.info