This repository has been archived by the owner on Feb 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 274
86 lines (80 loc) · 2.31 KB
/
ci.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
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
# todo: Rename to main
push:
branches: [master]
pull_request:
branches: [master]
jobs:
get_dependencies:
name: "Get dependencies"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- name: "Print Dart SDK Version"
run: dart --version
- uses: actions/cache@v2
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- name: "Get dependencies"
env:
PUB_CACHE: ".dart_tool/pub_cache"
run: dart pub upgrade
analyze:
name: "Analysis"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: "dart format --output=none --set-exit-if-changed ."
- run: dart analyze --fatal-infos
vm_tests:
name: "Unit Tests (Dart VM)"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: dart test --coverage test_coverage
env:
INFURA_ID: ${{ secrets.INFURA_ID }}
- run: dart run tool/format_coverage.dart
- uses: codecov/codecov-action@v1
with:
files: lcov.info
browser_tests:
name: "Unit Tests (Browser)"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: dart test -x expensive --platform chrome,firefox
integration_tests:
name: "Integration Tests"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: sudo npm i -g ganache-cli
- run: dart run tool/integration_test.dart