forked from opensearch-project/opensearch-migrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andre Kurait <[email protected]>
- Loading branch information
1 parent
41e0b5d
commit fcd1218
Showing
2 changed files
with
93 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
name: Codecov Publish | ||
# name: Codecov Publish | ||
|
||
# Due to the behavior of workflow_run, changes to this file will | ||
# only be reflected once it is pushed up to the `default` (main) branch | ||
# | ||
# It is recommended to test changes to this file by pushing to the default branch | ||
# on a fork and evaluating the correctness of the action execution | ||
# # Due to the behavior of workflow_run, changes to this file will | ||
# # only be reflected once it is pushed up to the `default` (main) branch | ||
# # | ||
# # It is recommended to test changes to this file by pushing to the default branch | ||
# # on a fork and evaluating the correctness of the action execution | ||
|
||
on: | ||
workflow_run: | ||
workflows: [CI] | ||
types: | ||
- completed | ||
# on: | ||
# workflow_run: | ||
# workflows: [CI] | ||
# types: | ||
# - completed | ||
|
||
jobs: | ||
publish-codecov: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Workflow Info | ||
uses: actions/download-artifact@v4 | ||
with: | ||
# Needed for cross run downloading | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
name: workflow-info | ||
run-id: ${{ github.event.workflow_run.id }} | ||
- name: Set Environment Variables from JSON | ||
run: | | ||
ls | ||
# Read the JSON file and export each key-value pair as an environment variable | ||
for key in $(jq -r 'keys[]' ./workflow-info.json); do | ||
value=$(jq -r --arg key "$key" '.[$key]' ./workflow-info.json) | ||
echo "workflow-info_$key=$value" | ||
echo "workflow-info_$key=$value" >> $GITHUB_ENV | ||
done | ||
- name: Download Coverage Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
# Needed for cross run downloading | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path: ./coverage-reports | ||
pattern: coverage-reports-* | ||
run-id: ${{ github.event.workflow_run.id }} | ||
# jobs: | ||
# publish-codecov: | ||
# if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Download Workflow Info | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# # Needed for cross run downloading | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# name: workflow-info | ||
# run-id: ${{ github.event.workflow_run.id }} | ||
# - name: Set Environment Variables from JSON | ||
# run: | | ||
# ls | ||
# # Read the JSON file and export each key-value pair as an environment variable | ||
# for key in $(jq -r 'keys[]' ./workflow-info.json); do | ||
# value=$(jq -r --arg key "$key" '.[$key]' ./workflow-info.json) | ||
# echo "workflow-info_$key=$value" | ||
# echo "workflow-info_$key=$value" >> $GITHUB_ENV | ||
# done | ||
# - name: Download Coverage Artifacts | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# # Needed for cross run downloading | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# path: ./coverage-reports | ||
# pattern: coverage-reports-* | ||
# run-id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
files: /**/coverage-reports/**/*.* | ||
flags: unittests | ||
override_branch: ${{ env.workflow-info_branch }} | ||
override_commit: ${{ env.workflow-info_commit }} | ||
override_pr: ${{ env.workflow-info_pr_number }} | ||
commit_parent: ${{ env.workflow-info_commit_parent }} | ||
override_build_url: ${{ env.workflow-info_build_url }} | ||
override_build: ${{ env.workflow-info_build }} | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true | ||
# - name: Upload coverage report | ||
# uses: codecov/codecov-action@v4 | ||
# with: | ||
# fail_ci_if_error: true | ||
# files: /**/coverage-reports/**/*.* | ||
# flags: unittests | ||
# override_branch: ${{ env.workflow-info_branch }} | ||
# override_commit: ${{ env.workflow-info_commit }} | ||
# override_pr: ${{ env.workflow-info_pr_number }} | ||
# commit_parent: ${{ env.workflow-info_commit_parent }} | ||
# override_build_url: ${{ env.workflow-info_build_url }} | ||
# override_build: ${{ env.workflow-info_build }} | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
# verbose: true |