-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (71 loc) · 1.93 KB
/
testing.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
75
name: Test Package
on:
pull_request:
branches:
- '**'
jobs:
lint_and_test:
strategy:
fail-fast: true
matrix:
sdk:
- 2.18.0
- stable
name: Linting and Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: enable protoc dart
run: dart pub global activate protoc_plugin
- name: build gRPC
run: ./tool/generate_grpc.sh
- run: dart pub get
- name: build barrel files
run: ./tool/generate_barrel_files.dart
- run: dart analyze
- run: dart test
test_result:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Test and Lint Results
needs: [lint_and_test]
steps:
- run: |
result="${{ needs.lint_and_test.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi
publish_dryrun:
name: Show publish dry run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: enable protoc dart
run: dart pub global activate protoc_plugin
- run: dart pub get
- name: build gRPC
run: ./tool/generate_grpc.sh
- name: build barrel files
run: ./tool/generate_barrel_files.dart
- run: echo '### Publish Pub Package Result' >> $GITHUB_STEP_SUMMARY
- run: dart pub publish --dry-run >> $GITHUB_STEP_SUMMARY
continue-on-error: true
- run: echo '' >> $GITHUB_STEP_SUMMARY