Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Code Climate test report only for Python 3.8 #169

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

pv8
Copy link
Owner

@pv8 pv8 commented Jan 11, 2021

Send Code Climate test report only when running tests on Python 3.8.

Because GitHub actions doesn't set GIT_BRANCH nor GIT_COMMIT_SHA, some workarounds had to be implemented:

  • For actions/checkout@v2 or higher, GITHUB_HEAD_REF needs to be fetched:

    git fetch --no-tags --prune --depth=1 origin +refs/heads/$GITHUB_HEAD_REF:refs/remotes/origin/$GITHUB_HEAD_REF
  • Set GIT_BRANCH and GIT_COMMIT_SHA before executing ./cc-test-reporter:

    GIT_BRANCH=$GITHUB_HEAD_REF GIT_COMMIT_SHA=$(git rev-parse origin/$GITHUB_HEAD_REF) ./cc-test-reporter ...

@pv8 pv8 self-assigned this Jan 11, 2021
@pv8 pv8 force-pushed the chore-send-cc-report-conditionally branch 9 times, most recently from 66e7b72 to 941ec89 Compare January 11, 2021 21:04
@pv8 pv8 force-pushed the chore-send-cc-report-conditionally branch from 941ec89 to d83b302 Compare January 11, 2021 21:11
@pv8 pv8 merged commit 72344cf into main Jan 11, 2021
@pv8 pv8 deleted the chore-send-cc-report-conditionally branch January 11, 2021 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant