-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.34 KB
/
coverage.yaml
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
on:
push:
branches:
- main
name: coverage
env:
flutter_version: '3.10.x'
jobs:
build:
name: coverage
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: set up flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
- name: flutter version
run: flutter --version
- name: flutter pub get
run: flutter pub get
- name: coverage
run: flutter test --file-reporter=json:test.json --coverage
env:
TEST_S3_ENDPOINT: ${{ vars.TEST_S3_ENDPOINT }}
TEST_S3_BUCKET: ${{ secrets.TEST_S3_BUCKET}}
TEST_S3_ACCESS_KEY: ${{ secrets.TEST_S3_ACCESS_KEY}}
TEST_S3_SECRET_KEY: ${{ secrets.TEST_S3_SECRET_KEY}}
- name: upload coverage reports to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}