diff --git a/.github/actions/flutter_package/action.yaml b/.github/actions/flutter_package/action.yaml index 6936411..027c28f 100644 --- a/.github/actions/flutter_package/action.yaml +++ b/.github/actions/flutter_package/action.yaml @@ -79,6 +79,11 @@ runs: - name: Upload Coverage uses: codecov/codecov-action@v3 with: + # We use Codecov's carryforward flags to allow our PR testing to only + # run affected packages, but also allow our coverage information from + # past runs to "carry forward" on a "per flag" basis. We tag coverage + # information with "flags" explaining what directory the coverage is from. + # https://docs.codecov.com/docs/carryforward-flags flags: ${{ steps.split.outputs.package_name }} token: ${{ inputs.codecov_token }} diff --git a/.github/actions/rust_crate/action.yaml b/.github/actions/rust_crate/action.yaml index 2745ae9..a02ec4f 100644 --- a/.github/actions/rust_crate/action.yaml +++ b/.github/actions/rust_crate/action.yaml @@ -36,5 +36,10 @@ runs: - name: Upload Coverage uses: codecov/codecov-action@v3 with: + # We use Codecov's carryforward flags to allow our PR testing to only + # run affected packages, but also allow our coverage information from + # past runs to "carry forward" on a "per flag" basis. We tag coverage + # information with "flags" explaining what directory the coverage is from. + # https://docs.codecov.com/docs/carryforward-flags flags: ${{ steps.split.outputs.package_name }} token: ${{ inputs.codecov_token }} diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000..836d3e0 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,13 @@ +# Not sure if .yaml suffix would work, currently using .yml to match examples: +# https://docs.codecov.com/docs/codecov-yaml +# Validate with: +# curl -X POST --data-binary @codecov.yml https://codecov.io/validate +# See https://docs.codecov.com/docs/flags +flag_management: + default_rules: # the rules that will be followed for any flag added, generally + # We use Codecov's carryforward flags to allow our PR testing to only + # run affected packages, but also allow our coverage information from + # past runs to "carry forward" on a "per flag" basis. We tag coverage + # information with "flags" explaining what directory the coverage is from. + # https://docs.codecov.com/docs/carryforward-flags + carryforward: true