Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from MattHamburger/develop
Version 1.5.0
- Loading branch information
Showing
262 changed files
with
2,125 additions
and
1,734 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
flutter config --no-analytics | ||
flutter pub global activate melos | ||
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
.history | ||
.svn/ | ||
.fvm/ | ||
pubspec_overrides.yaml | ||
|
||
# IntelliJ related | ||
*.iml | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.