-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (37 loc) · 1.03 KB
/
test.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
name: test
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches:
- master
- releases/*
paths-ignore:
- "**.md"
jobs:
test:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
# Caching for Unix-like OPs
- uses: actions/cache@v3
if: ${{ !startsWith(matrix.operating-system, 'windows') }}
with:
path: "~/.pub-cache"
key: ${{ runner.os }}-${{ hashFiles('pubspec.yaml') }}
# Caching on Windows.
- uses: actions/cache@v3
if: ${{ startsWith(matrix.operating-system, 'windows') }}
with:
path: '%LOCALAPPDATA%\Pub\Cache'
key: ${{ runner.os }}-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: dart pub get
- run: dart format --output=none --set-exit-if-changed .
- run: dart analyze
- run: dart test