-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.1 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
name: Test
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 2
- uses: dart-lang/setup-dart@v1
with:
channel: stable
- name: Add pub cache bin to PATH
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
- name: Add pub cache to PATH
run: echo "PUB_CACHE="$HOME/.pub-cache"" >> $GITHUB_ENV
- name: Install dependencies
run: dart pub get
- name: Check format
run: dart format --set-exit-if-changed .
- name: Analyze
run: dart analyze
- name: Run tests
run: |
dart pub global activate coverage
dart test --coverage=coverage
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --check-ignore
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: coverage/locv.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true