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

setup github actions #3

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bahag-raesenerm
Copy link

Hey devkabiir,

here is a starting point to integrate github actions, as suggest by the ToDos in your issue :)

- name: Install and set Flutter version
uses: subosito/flutter-action@v1.5.3
with:
channel: 'stable'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, also the beta channel? with optional run so it doesn't block PRs from merging but still helpful to know when things stop working on beta

# filename: capp_bauhaus_coverage_badge_last_run.json
# label: coverage-last-run
# message: ${{ env.COVERAGE }}
# color: blue
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing, EOF new line

Comment on lines +37 to +47
# - name: get coverage and prepare percentage for badge
# run: |
# brew install lcov
# PERCENTAGE=$(lcov --remove coverage/lcov.info 'lib/*/*.freezed.dart' 'lib/*/*.g.dart' 'lib/*/*.part.dart' 'lib/generated/*.dart' 'lib/generated/*.*.dart' -o coverage/lcov.info | egrep '\d+.\d+%' | cut -d' ' -f4)
# echo "COVERAGE=${PERCENTAGE}" >> $GITHUB_ENV

# - name: Create the Badge
# uses: schneegans/dynamic-badges-action@v1.0.0
# with:
# auth: ${{ secrets.GIST_ACCESS_COVERAGE }}
# gistID: 8a0e501902cba357972bc73b1f911804
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any alternatives to this? Could we just create a local badge and display that in the readme.

# see https://github.com/flutter/flutter/issues/27997#issue-410722816
find lib '!' -path '*generated*/*' '!' -name '*.g.dart' '!' -name '*.part.dart' '!' -name '*.freezed.dart' -name '*.dart' | cut -c4- | awk -v package=$1 '{printf "import '\''package:capp_bauhaus%s%s'\'';\n", package, $1}' >> test/coverage_helper_file.dart

echo "void main(){}" >> test/coverage_helper_file.dart
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing EOF newline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants