Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use very_good_workflows #146

Merged
merged 3 commits into from Aug 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 4 additions & 40 deletions .github/workflows/main.yaml
Expand Up @@ -7,45 +7,9 @@ on:
pull_request:

jobs:
semantic-pull-request:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
- uses: dart-lang/setup-dart@v1

- name: Install Dependencies
run: dart pub get

- name: Format
run: dart format .

- name: Analyze
run: dart analyze .

- name: Run Tests
run: |
pub global activate test_coverage
export PATH=$PATH:$HOME/.pub-cache/bin
test_coverage

- name: Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v1.1.1

uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
pana:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
- uses: subosito/flutter-action@v1.5.3

- name: Install Dependencies
run: |
flutter packages get
flutter pub global activate pana
- name: Verify Pub Score
run: |
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 (( $SCORE < $TOTAL )); then echo "minimum score not met!"; exit 1; fi
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1