-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.33 KB
/
code-quality-tests.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
43
44
45
46
47
48
49
50
51
52
53
name: Code Quality
on: [ push ]
jobs:
check-code-quality-and-tests:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Write .env file
run: |
cd components/interface_adapters
echo $ENV | base64 -d > .env
shell: bash
env:
ENV: ${{ secrets.ENV }}
- name: Setup flutter
uses: subosito/flutter-action@v1
with:
channel: stable
- name: Write env.g.dart file
run: |
cd components/interface_adapters
dart run build_runner build --delete-conflicting-outputs
shell: bash
- name: Get packages
run: flutter pub get
- name: Check format errors
run: dart format --set-exit-if-changed .
- name: Check lint errors
run: flutter analyze .
- name: Run tests with coverage and random order
run: flutter test --coverage --test-randomize-ordering-seed random
- name: Very Good Coverage
uses: VeryGoodOpenSource/[email protected]
with:
min_coverage: 33.9
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: Turskyi/ethical_scanner