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

Urlencode job for GitHub Actions #401

Merged
merged 12 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: 2.1
orbs:
shellcheck: circleci/shellcheck@2.2.2
jobs:
build:
docker:
Expand All @@ -15,11 +17,16 @@ jobs:
gem install simplecov
gem install simplecov-cobertura
gem install bashcov
- shellcheck/install
- run:
name: Run Tests
command: |
env -i PATH="$PATH"
bashcov tests/test
shellcheck codecov tests/test
shasum --algorithm 1 --check --strict ./SHA1SUM
shasum --algorithm 256 --check --strict ./SHA256SUM
shasum --algorithm 512 --check --strict ./SHA512SUM
- run:
name: Upload Codecov
command: |
Expand Down
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion SHA1SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b2d91c9a9e5e44495e7cb28bb01812024f007332 codecov
b9287f592cf823e36c63f2cdc8bdee6419a5032a codecov
2 changes: 1 addition & 1 deletion SHA256SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
980c09cd11e443d3976fd5be6d5d58704bf4c702866974200c0bdb1a275110a2 codecov
04365f195758f9be5baa8c46bf4143e225e1fdac04c03b10658c2f8f40872aa6 codecov
2 changes: 1 addition & 1 deletion SHA512SUM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a5d92fd71ae5c8ed558f995cc8788a8ea4395431809238591f525e4965f137676ca293caebf206f0a7f59b5690561e6b2642eaf9cba290a6777d51e9aa2d26f2 codecov
e5805df57005d62819b4d724ae8092e4adb908a71064f56975845c094792496a3a9411e58ef78047c0a21f205b033c0874f26c360bbb55dda102c5bf65d72c8e codecov
3 changes: 1 addition & 2 deletions codecov
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ urlencode() {
echo "$1" | curl -Gso /dev/null -w "%{url_effective}" --data-urlencode @- "" | cut -c 3- | sed -e 's/%0A//'
}


swiftcov() {
_dir=$(dirname "$1" | sed 's/\(Build\).*/\1/g')
for _type in app framework xctest
Expand Down Expand Up @@ -837,7 +836,7 @@ then
slug="${GITHUB_REPOSITORY}"
build="${GITHUB_RUN_ID}"
build_url=$(urlencode "http://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}")
job="${GITHUB_WORKFLOW}"
job="$(urlencode "${GITHUB_WORKFLOW}")"
thomasrockhu marked this conversation as resolved.
Show resolved Hide resolved

# actions/checkout runs in detached HEAD
mc=
Expand Down
13 changes: 13 additions & 0 deletions tests/test
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,19 @@ function test_github_action_pr () {
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"
}

function test_github_action_emoji () {
reset

export GITHUB_ACTIONS="true"
export GITHUB_REF="refs/heads/master"
export GITHUB_REPOSITORY="codecov/ci-repo"
export GITHUB_RUN_ID="32402849"
export GITHUB_SHA="$TEST_DATA_GIT_COMMIT"
export GITHUB_WORKFLOW="💡🏠"

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"
}

function test_semaphore (){
reset
export CI="true"
Expand Down