Skip to content

Commit

Permalink
Merge pull request #89 from MattHamburger/develop
Browse files Browse the repository at this point in the history
Version 1.5.0
  • Loading branch information
sarbagya-acme committed Nov 1, 2022
2 parents b617a4d + 2ea72e2 commit dca68cd
Show file tree
Hide file tree
Showing 262 changed files with 2,125 additions and 1,734 deletions.
58 changes: 38 additions & 20 deletions .github/workflows/gen-cov.yml
@@ -1,43 +1,61 @@
name: Analyze, Run Tests & Generate Coverage
name: Quality Check

on: [push, pull_request]
on:
push:
pull_request:
types: [ opened, reopened ]

jobs:
gen-cov:
name: Generate Coverage
runs-on: ubuntu-latest

steps:
- name: Check out current repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Flutter Stable
uses: subosito/flutter-action@v1
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: 'Install Tools'
run: |
./.github/workflows/scripts/install-tools.sh
- name: Get package dependencies
run: flutter pub get
run: melos bs

- name: Analyze dart code for the project
run: flutter analyze

- name: Run tests and generate coverage for the library
run: flutter test --coverage
run: melos analyze

- name: Run tests and generate coverage for the example app
run: flutter test --coverage
working-directory: example
- name: Run tests and generate coverage
run: melos coverage:all

- name: Upload library coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage/lcov.info
files: ./packages/clean_framework/coverage/lcov.info,./packages/clean_framework_firestore/coverage/lcov.info,./packages/clean_framework_graphql/coverage/lcov.info,./packages/clean_framework_rest/coverage/lcov.info,./packages/clean_framework_router/coverage/lcov.info,./packages/clean_framework_test/coverage/lcov.info
name: clean-framework-coverage

- name: Upload example coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./example/coverage/lcov.info
name: clean-framework-example-coverage
# pana:
# defaults:
# run:
# working-directory: packages/clean_framework
#
# name: Verify Pub Score
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
# - uses: subosito/flutter-action@v2
#
# - name: Install Dependencies
# run: |
# flutter packages get
# flutter pub global activate pana
#
# - name: Verify Pub Score
# run: |
# ./.github/workflows/scripts/verify-pub-score.sh
5 changes: 5 additions & 0 deletions .github/workflows/scripts/install-tools.sh
@@ -0,0 +1,5 @@
#!/bin/bash

flutter config --no-analytics
flutter pub global activate melos
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
16 changes: 16 additions & 0 deletions .github/workflows/scripts/verify-pub-score.sh
@@ -0,0 +1,16 @@
#!/bin/bash
# Runs `pana . --no-warning` and verifies that the package score
# is greater or equal to the desired score. By default the desired score is
# a perfect score but it can be overridden by passing the desired score as an argument.
#
# Ensure the package has a score of at least a 100
# `./verify_pub_score.sh 100`
#
# Ensure the package has a perfect score
# `./verify_pub_score.sh`

PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
echo "score: $PANA_SCORE"
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1]
if [ -z "$1" ]; then MINIMUM_SCORE=TOTAL; else MINIMUM_SCORE=$1; fi
if (( $SCORE < $MINIMUM_SCORE )); then echo "minimum score $MINIMUM_SCORE was not met!"; exit 1; fi
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,6 +10,7 @@
.history
.svn/
.fvm/
pubspec_overrides.yaml

# IntelliJ related
*.iml
Expand Down
40 changes: 22 additions & 18 deletions LICENSE
@@ -1,21 +1,25 @@
MIT License
Copyright 2020 Acme Software LLC. All rights reserved.

Copyright (c) 2021 Matt Hamburger
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 changes: 4 additions & 9 deletions analysis_options.yaml
@@ -1,12 +1,7 @@
analyzer:
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# treat missing returns as a warning (not a hint)
missing_return: warning
# allow having TODOs in the code
todo: ignore
include: package:very_good_analysis/analysis_options.yaml

linter:
rules:
#- public_member_api_docs
one_member_abstracts: false
only_throw_errors: false
public_member_api_docs: false
2 changes: 1 addition & 1 deletion docs/index.mdx
Expand Up @@ -6,7 +6,7 @@ Add this to your package's pubspec.yaml file:

```
dependencies:
clean_framework: ^1.4.2
clean_framework: ^1.5.0
```

## Install it
Expand Down
16 changes: 0 additions & 16 deletions lib/clean_framework_defaults.dart

This file was deleted.

8 changes: 0 additions & 8 deletions lib/clean_framework_tests.dart

This file was deleted.

52 changes: 0 additions & 52 deletions lib/src/defaults/network_service.dart

This file was deleted.

0 comments on commit dca68cd

Please sign in to comment.