-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (33 loc) · 1.14 KB
/
main.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: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- name: Install dependencies
run: dart pub get
- name: Activate coverage
run: pub global activate coverage
- name: Test package
run: dart test --coverage=coverage
env:
TOKEN: ${{ secrets.TOKEN }}
TEST_DATABASE_ID: ${{ secrets.TEST_DATABASE_ID }}
TEST_PAGE_ID: ${{ secrets.TEST_PAGE_ID }}
TEST_BLOCK_ID: ${{ secrets.TEST_BLOCK_ID }}
TEST_BLOCK_HEADING_ID: ${{ secrets.TEST_BLOCK_HEADING_ID }}
EXEC_ENV: 'github_actions'
- name: Format coverage
run: pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib
- name: Upload coverge to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/lcov.info