Skip to content

Commit

Permalink
adjust ci
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Jan 1, 2025
1 parent a467afa commit e64d2b3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/actions/dart_package/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ inputs:
codecov_token:
required: true
description: The Codecov token used to upload coverage
collect_coverage:
required: false
default: "true"
description: Whether to collect code coverage
collect_score:
required: false
default: "true"
description: Whether to collect the pana score
concurrency:
required: false
default: "4"
Expand Down Expand Up @@ -69,13 +77,15 @@ runs:
dart test -j ${{inputs.concurrency}} --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=${{inputs.report_on}} --check-ignore
- name: 📦 Detect Package Name
if: inputs.collect_coverage == 'true'
env:
PACKAGE_PATH: ${{ inputs.working_directory}}
id: package
shell: ${{ inputs.shell }}
run: echo "name=${PACKAGE_PATH##*/}" >> $GITHUB_OUTPUT

- name: ⬆️ Upload Coverage
if: inputs.collect_coverage == 'true'
uses: codecov/codecov-action@v4
env:
PACKAGE_PATH: ${{ inputs.working_directory}}
Expand All @@ -84,13 +94,15 @@ runs:
token: ${{ inputs.codecov_token }}

- name: 📊 Verify Coverage
if: inputs.collect_coverage == 'true'
uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: ${{inputs.working_directory}}/coverage/lcov.info
exclude: ${{inputs.coverage_excludes}}
min_coverage: ${{inputs.min_coverage}}

- name: 💯 Verify Pub Score
if: inputs.collect_score == 'true'
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: |
Expand Down

0 comments on commit e64d2b3

Please sign in to comment.