forked from simolus3/web3dart
-
Notifications
You must be signed in to change notification settings - Fork 96
53 lines (48 loc) · 1.33 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
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
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