Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit cec3c92

Browse files
authored
Merge pull request #401 from codecov/support-job-emojis
Urlencode job for GitHub Actions
2 parents 23d4836 + 0d26842 commit cec3c92

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

.circleci/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
version: 2.1
2+
orbs:
3+
shellcheck: circleci/[email protected]
24
jobs:
35
build:
46
docker:
@@ -15,11 +17,16 @@ jobs:
1517
gem install simplecov
1618
gem install simplecov-cobertura
1719
gem install bashcov
20+
- shellcheck/install
1821
- run:
1922
name: Run Tests
2023
command: |
2124
env -i PATH="$PATH"
2225
bashcov tests/test
26+
shellcheck codecov tests/test
27+
shasum --algorithm 1 --check --strict ./SHA1SUM
28+
shasum --algorithm 256 --check --strict ./SHA256SUM
29+
shasum --algorithm 512 --check --strict ./SHA512SUM
2330
- run:
2431
name: Upload Codecov
2532
command: |

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

SHA1SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b2d91c9a9e5e44495e7cb28bb01812024f007332 codecov
1+
b9287f592cf823e36c63f2cdc8bdee6419a5032a codecov

SHA256SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
980c09cd11e443d3976fd5be6d5d58704bf4c702866974200c0bdb1a275110a2 codecov
1+
04365f195758f9be5baa8c46bf4143e225e1fdac04c03b10658c2f8f40872aa6 codecov

SHA512SUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a5d92fd71ae5c8ed558f995cc8788a8ea4395431809238591f525e4965f137676ca293caebf206f0a7f59b5690561e6b2642eaf9cba290a6777d51e9aa2d26f2 codecov
1+
e5805df57005d62819b4d724ae8092e4adb908a71064f56975845c094792496a3a9411e58ef78047c0a21f205b033c0874f26c360bbb55dda102c5bf65d72c8e codecov

codecov

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ urlencode() {
206206
echo "$1" | curl -Gso /dev/null -w "%{url_effective}" --data-urlencode @- "" | cut -c 3- | sed -e 's/%0A//'
207207
}
208208

209-
210209
swiftcov() {
211210
_dir=$(dirname "$1" | sed 's/\(Build\).*/\1/g')
212211
for _type in app framework xctest
@@ -837,7 +836,7 @@ then
837836
slug="${GITHUB_REPOSITORY}"
838837
build="${GITHUB_RUN_ID}"
839838
build_url=$(urlencode "http://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}")
840-
job="${GITHUB_WORKFLOW}"
839+
job="$(urlencode "${GITHUB_WORKFLOW}")"
841840

842841
# actions/checkout runs in detached HEAD
843842
mc=

tests/test

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,19 @@ function test_github_action_pr () {
386386
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=patch-2&commit=$TEST_DATA_GIT_COMMIT&build=32402849&build_url=http%3A%2F%2Fgithub.com%2Fcodecov%2Fci-repo%2Factions%2Fruns%2F32402849&name=&tag=&slug=codecov%2Fci-repo&service=github-actions&flags=&pr=7&job=&cmd_args=d,C"
387387
}
388388

389+
function test_github_action_emoji () {
390+
reset
391+
392+
export GITHUB_ACTIONS="true"
393+
export GITHUB_REF="refs/heads/master"
394+
export GITHUB_REPOSITORY="codecov/ci-repo"
395+
export GITHUB_RUN_ID="32402849"
396+
export GITHUB_SHA="$TEST_DATA_GIT_COMMIT"
397+
export GITHUB_WORKFLOW="💡🏠"
398+
399+
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=32402849&build_url=http%3A%2F%2Fgithub.com%2Fcodecov%2Fci-repo%2Factions%2Fruns%2F32402849&name=&tag=&slug=codecov%2Fci-repo&service=github-actions&flags=&pr=&job=%F0%9F%92%A1%F0%9F%8F%A0&cmd_args=d,C"
400+
}
401+
389402
function test_semaphore (){
390403
reset
391404
export CI="true"

0 commit comments

Comments
 (0)