Validate codecov config #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow checks that the codecov.yml file is valid, if it is included in the PR. | |
# | |
# Author: Stefanie Molin | |
name: Validate codecov config | |
on: | |
pull_request: | |
paths: | |
- '.github/codecov.yml' | |
schedule: | |
- cron: '21 21 21 * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
# check that the codecov.yml configuration is valid | |
codecov: | |
runs-on: ubuntu-latest | |
name: Validate codecov.yml | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Validate with codecov API | |
run: | | |
response=$(cat .github/codecov.yml | curl --data-binary @- https://codecov.io/validate) | |
echo $response | |
if [[ $response = Error* ]]; then | |
exit 1 | |
fi |