From 83c4d151322e2527839780e1134dbc5f473223e3 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Fri, 9 Jun 2023 10:24:05 -0700 Subject: [PATCH] ci: fix codecov in dart_package action (#619) --- .github/actions/dart_package/action.yaml | 11 +++++++---- .github/workflows/main.yaml | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/actions/dart_package/action.yaml b/.github/actions/dart_package/action.yaml index 86754f3c..459b1f08 100644 --- a/.github/actions/dart_package/action.yaml +++ b/.github/actions/dart_package/action.yaml @@ -2,6 +2,9 @@ name: Dart Package Workflow description: Build and test your Dart packages. inputs: + codecov_token: + required: true + description: The Codecov token used to upload coverage concurrency: required: false default: "4" @@ -64,10 +67,10 @@ runs: dart pub global activate coverage dart test -j ${{inputs.concurrency}} --coverage=coverage --platform=${{inputs.platform}} && 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: Upload Coverage - # uses: codecov/codecov-action@v3 - # with: - # token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload Coverage + uses: codecov/codecov-action@v3 + with: + token: ${{ inputs.codecov_token }} - uses: VeryGoodOpenSource/very_good_coverage@v2 with: diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 33a65535..085eaa0b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,6 +6,7 @@ concurrency: on: pull_request: + push: branches: - main @@ -37,38 +38,38 @@ jobs: filters: | artifact_proxy: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/artifact_proxy/** cutler: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/cutler/** discord_gcp_alerts: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/discord_gcp_alerts/** shorebird_cli: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/shorebird_cli/** - packages/shorebird_code_push_client/** - packages/shorebird_code_push_protocol/** shorebird_code_push_client: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/shorebird_code_push_client/** - packages/shorebird_code_push_protocol/** shorebird_code_push_protocol: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/shorebird_code_push_protocol/** jwt: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/jwt/** scoped: - ./.github/workflows/main.yaml - - ./.github/actions/dart_package + - ./.github/actions/dart_package/action.yaml - packages/scoped/** - uses: dorny/paths-filter@v2 @@ -100,6 +101,7 @@ jobs: - name: 🎯 Build ${{ matrix.package }} uses: ./.github/actions/dart_package with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} working_directory: packages/${{ matrix.package }} min_coverage: ${{ matrix.package == 'cutler' && '10' || '100' }}