generated from marchdev-tk/dart_package_template
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 1.12 KB
/
dart_build.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
name: build
on:
push:
branches:
- main
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
container:
image: google/dart:latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: pub get
- name: Run tests
run: pub run test
# Replace %PROJECT_NAME% to the real project name
# - name: Activate coverage package
# run: pub global activate coverage
# - name: Collect coverage in json
# run: dart --disable-service-auth-codes --enable-vm-service=8111 --pause-isolates-on-exit test/%PROJECT_NAME%_test.dart & nohup pub global run coverage:collect_coverage --port=8111 --out=coverage.json --wait-paused --resume-isolates
# - name: Convert coverage to lcov
# run: pub global run coverage:format_coverage --lcov --in=coverage.json --out=lcov.info --packages=.packages --report-on=lib
# - name: Upload coverage to Codecov
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# flags: unittests
# file: ./lcov.info
# name: codecov-%PROJECT_NAME%