Small Improvements. (#15) #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 31 | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: Turskyi/ethical_scanner |