Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
Signed-off-by: joseph-sentry <[email protected]>
  • Loading branch information
joseph-sentry committed May 9, 2024
1 parent e11eb2c commit 7dd83e3
Show file tree
Hide file tree
Showing 6 changed files with 2,975 additions and 7,231 deletions.
82 changes: 5 additions & 77 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: 'Codecov Test Result Action'
description: 'GitHub Action that uploads test result reports for your repository to codecov.io'
author: 'Codecov'
inputs:
codecov_yml_path:
description: 'Specify the path to the Codecov YML'
token:
description: 'Token used to access Github API. Takes value of github.token by default.'
required: false
default: ${{ github.token }}
directory:
description: 'Directory to search for test result reports.'
required: false
Expand Down Expand Up @@ -50,78 +51,5 @@ branding:
icon: 'umbrella'

runs:
using: "composite"
steps:
- name: Verify CLI
shell: bash
env:
PLATFORM: ${{ inputs.os }}
VERSION: ${{ inputs.version }}
run: |
[[ -n "$VERSION" ]] && version=$VERSION || version='latest'
if [ -n "$PLATFORM" ]; then
echo 1
final_platform=$PLATFORM
elif [ -n "$RUNNER_OS" ]; then
echo 2
final_platform=$(echo "$RUNNER_OS" | awk '{print tolower($0)}')
else
echo 3
final_platform='linux'
fi
[[ "$final_platform" = 'ubuntu' ]] && final_platform='linux'
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
if [ "$final_platform" = 'windows' ]; then
curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov.exe
curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov.exe.SHA256SUM
curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov.exe.SHA256SUM.sig
gpg --no-default-keyring --keyring trustedkeys.gpg --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
certutil -hashfile codecov.exe.SHA256SUM SHA256
chmod +x ./codecov
else
curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov
echo "curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov"
curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov.SHA256SUM
echo "curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov.SHA256SUM"
curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov.SHA256SUM.sig
echo "curl -Os https://cli.codecov.io/${version}/${final_platform}/codecov.SHA256SUM.sig"
gpg --no-default-keyring --keyring trustedkeys.gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x ./codecov
fi
- name: Process locally
run: |
if [[ '${{ inputs.url }}' != '' ]]; then
url='${{ inputs.url }}'
fi
if [[ '${{ inputs.codecov_yml_path }}' != '' ]];
then
yml_path='${{ inputs.codecov_yml_path }}'
fi
if [[ '${{ inputs.verbose }}' != 'false' ]];
then
verbose='${{ inputs.verbose }}'
fi
echo ${verbose+--verbose} ${url+--url "$url"} ${yml_path+--codecov-yml-path "$yml_path"}
# ./codecov \
# ${verbose+--verbose} \
# ${url+--url "$url"} \
# ${yml_path+--codecov-yml-path "$yml_path"}
# process-test-results \
# --report-type test_results \
# --provider-token '${{ github.token }}'
shell: bash
using: 'node20'
main: 'dist/index.js'
Loading

0 comments on commit 7dd83e3

Please sign in to comment.