Skip to content

Commit

Permalink
feat: use process-test-results
Browse files Browse the repository at this point in the history
we are making this change so users don't have to phone home to Codecov.

this command will parse the test results files locally and make the
Codecov test results comment from the Github Action.

Signed-off-by: joseph-sentry <[email protected]>
  • Loading branch information
joseph-sentry committed May 10, 2024
1 parent 2b4994e commit 11e82fe
Show file tree
Hide file tree
Showing 7 changed files with 2,915 additions and 7,151 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,18 @@ jobs:
uses: ./
with:
files: ./demo/calculator/junit.xml
flags: ${{ matrix.os }}
verbose: true
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: Upload test results to Codecov (demo)
uses: ./
with:
files: ./demo/coverage-test/junit.xml
flags: ${{ matrix.os }}
verbose: true
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: Upload test results to Codecov (calculator) (staging)
uses: ./
with:
files: ./demo/calculator/junit.xml
flags: ${{ matrix.os }}
verbose: true
url: ${{ secrets.CODECOV_STAGING_URL }}
token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
- name: Upload test results to Codecov (demo) (staging)
uses: ./
with:
url: ${{ secrets.CODECOV_STAGING_URL }}
token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
files: ./demo/coverage-test/junit.xml
flags: ${{ matrix.os }}
verbose: true
46 changes: 4 additions & 42 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,74 +3,36 @@ description: 'GitHub Action that uploads test result reports for your repository
author: 'Codecov'
inputs:
token:
description: 'Repository Codecov token. Used to authorize report uploads'
required: false
codecov_yml_path:
description: 'Specify the path to the Codecov YML'
required: false
commit_parent:
description: 'Override to specify the parent commit SHA'
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
disable_search:
description: 'Disable search for test result files. This is helpful when specifying what files you want to upload with the --file option.'
required: false
dry_run:
description: "Don't upload files to Codecov"
required: false
env_vars:
description: 'Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON)'
required: false
exclude:
description: 'Folders to exclude from search'
required: false
fail_ci_if_error:
description: 'Specify whether or not CI build should fail if Codecov runs into an error during upload'
description: 'Specify whether or not CI build should fail if Codecov runs into an error during processing'
required: false
file:
description: 'Path to test result file to upload'
required: false
files:
description: 'Comma-separated list of files to upload'
required: false
flags:
description: 'Flag upload to group test results (e.g. py3.10 | py3.11 | py3.12)'
required: false
handle_no_reports_found:
description: 'Raise no exceptions when no test result reports found'
required: false
name:
description: 'User defined upload name. Visible in Codecov UI'
required: false
os:
description: 'Override the assumed OS. Options are linux | macos | windows.'
required: false
override_branch:
description: 'Specify the branch name'
required: false
override_build:
description: 'Specify the build number'
required: false
override_build_url:
description: 'The URL of the build where this is running'
required: false
override_commit:
description: 'Specify the commit SHA'
required: false
override_pr:
description: 'Specify the pull request number'
required: false
report_code:
description: 'The code of the report. If unsure, do not include'
required: false
root_dir:
description: 'Used when not in git/hg project to identify project root directory'
required: false
slug:
description: 'Specify the slug manually (Enterprise use)'
required: false
url:
description: 'Specify the base url to upload (Enterprise use)'
required: false
Expand All @@ -90,4 +52,4 @@ branding:

runs:
using: 'node20'
main: 'dist/index.js'
main: 'dist/index.js'
Loading

0 comments on commit 11e82fe

Please sign in to comment.