-
Notifications
You must be signed in to change notification settings - Fork 18
42 lines (39 loc) · 1.29 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
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
container:
image: dart:latest
env:
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: dart pub get
# Builder
- name: Build Runner
run: dart pub run build_runner build --delete-conflicting-outputs
# Run test
- name: Run tests
run: dart pub run test
# # Get coverage
# - name: Test Coverage
# run: pub run test_cov
# # Activate remove coverage
# - name: Remove Coverage activate
# run: pub global activate remove_from_coverage
# # Remove build files from coverage report
# - name: Remove generated files from Coverage
# run: pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '.g.dart$'
# - name: Remove freezed files from Coverage
# run: pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '.freezed.dart$'
# # Upload coverage report
# - name: Coveralls GitHub Action
# uses: coverallsapp/github-action@v1.1.2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}