Skip to content

Commit

Permalink
Fix code coverage report (emberjs#1167)
Browse files Browse the repository at this point in the history
Code Climate uses the `GIT_COMMIT_SHA` and `GIT_BRANCH` environment
variables for the reports.
  • Loading branch information
chancancode authored and nummi committed Apr 5, 2020
1 parent 4802e6c commit 6eed90f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
# Code Climate expects these variables to be set
- name: Set up commit metadata
if: github.event_name == 'push'
env:
GIT_COMMIT_SHA: ${{ github.sha }}
GIT_BRANCH: ${{ github.ref }}
run: |
echo "::set-env name=GIT_COMMIT_SHA::${GIT_COMMIT_SHA}"
echo "::set-env name=GIT_BRANCH::${GIT_BRANCH/refs\/heads\//}"
- name: Set up commit metadata
if: github.event_name == 'pull_request'
env:
GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
GIT_BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
echo "::set-env name=GIT_COMMIT_SHA::${GIT_COMMIT_SHA}"
echo "::set-env name=GIT_BRANCH::${GIT_BRANCH}"
- name: Set up Volta
uses: rwjblue/setup-volta@v1
- name: Install dependencies (yarn)
Expand Down Expand Up @@ -51,6 +68,7 @@ jobs:
# EMBER_ENV: test
# COVERAGE: 'true'
- name: Report coverage
if: github.event_name != 'schedule'
run: yarn codeclimate-test-reporter < coverage/lcov.info
env:
CODECLIMATE_REPO_TOKEN: 59edcfd1ffc778791af49ca594b503e7179f6bbe1991b2cc0c0a6987d103253d
Expand Down

0 comments on commit 6eed90f

Please sign in to comment.