Skip to content

Commit

Permalink
feat: added exclude-projects to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
prisis committed May 23, 2024
1 parent 24c23f9 commit 5c3eca4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions step/codecov/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ inputs:
description: "The affected files"
required: false
exclude-affected-projects:
description: "The projects to exclude"
description: "The projects to exclude when use-affected is enabled"
required: false
exclude-projects:
description: "The projects to exclude when full upload should happen"
required: false

runs:
Expand Down Expand Up @@ -74,8 +77,16 @@ runs:
if: "inputs.use-affected == 'false'"
shell: "bash"
run: |
IFS=',' read -r -a exclude_array <<< "${{ inputs.exclude-projects }}"
for dir in packages/*; do
./codecov --codecov-yml-path codecov.yml --verbose upload-process --fail-on-error --dir "${dir}" -t "${CODECOV_TOKEN}" -F "$(basename "${dir}")" -n "$(basename "${dir}")"-${{ github.run_id }}
dir_name=$(basename "${dir}")
if [[ " ${exclude_array[@]} " =~ " ${dir_name} " ]]; then
continue
fi
./codecov --codecov-yml-path codecov.yml --verbose upload-process --fail-on-error --dir "${dir}" -t "${CODECOV_TOKEN}" -F "${dir_name}" -n "${dir_name}"-${{ github.run_id }}
done
env:
CODECOV_TOKEN: "${{ inputs.codecov-token }}"

0 comments on commit 5c3eca4

Please sign in to comment.