Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change to contribution guide #4

Merged
merged 3 commits into from
Feb 26, 2024
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
24 changes: 2 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,11 @@ jobs:
files: ./demo/calculator/junit.xml
flags: ${{ matrix.os }}
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
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_TOKEN }}

- name: verify comment was made (not windows)
if: ${{ matrix.os != 'windows-latest' }}
run: |
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/codecov/test-results-action/issues/${{ github.event.pull_request.number }}/comments | \
jq -e '.[] | {user: .user.login, message: .body} | select((.user | contains("codecov[bot]")) and (.message | contains("Test Failures Detected")))'

- name: verify comment was made (windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
curl -L `
-H "Accept: application/vnd.github+json" `
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" `
-H "X-GitHub-Api-Version: 2022-11-28" `
https://api.github.com/repos/codecov/test-results-action/issues/${{ github.event.pull_request.number }}/comments | `
jq -e '.[] | {user: .user.login, message: .body} | select((.user | contains("codecov[bot]")) and (.message | contains("Test Failures Detected")))'
token: ${{ secrets.CODECOV_ORG_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following is a set of guidelines for contributing to this repository, which

## What does this repo do?

This repo is a GitHub Action, meaning it integrates with the GitHub Actions CI/CD pipeline. It's meant to take formatted reports with code coverage stats and upload them to codecov.io. Our Node action uses the Actions toolkit to make system calls that allow us to run Codecov's bash uploader inside of Node. Essentially what we're doing in this action is downloading Codecov's bash uploader script from codecov.io/bash, saving it as a file in the current directory, executing the file via `exec` calls, then removing the script from the current directory.
This repo is a GitHub Action, meaning it integrates with the GitHub Actions CI/CD pipeline. It's meant to take formatted reports with code coverage stats and upload them to codecov.io. Our Node action uses the Actions toolkit to make system calls that allow us to run Codecov's bash uploader inside of Node. Essentially what we're doing in this action is downloading Codecov's CLI, verifying it, and executing it via `exec` calls, then removing it from the current directory.

## PRs, Issues, and Support

Expand Down