Skip to content

Commit

Permalink
Adding branch info and disabling simtests for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ebmifa committed Feb 1, 2024
1 parent 634dfc9 commit f243fd6
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions .github/workflows/cargo-llvm-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,28 @@ jobs:
- name: Install Rust
run: rustup update stable

# - name: Run code coverage for nextest
# run: SUI_SKIP_SIMTESTS=1 cargo llvm-cov --ignore-run-fail --lcov --output-path lcov.info nextest
- name: Run code coverage for nextest
run: SUI_SKIP_SIMTESTS=1 cargo llvm-cov --ignore-run-fail --lcov --output-path lcov.info nextest

# - name: Upload report to Codecov for nextest
# uses: codecov/codecov-action@v3
# with:
# files: lcov.info
# fail_ci_if_error: true

- name: Run code coverage for simtest
run: |
./scripts/simtest/install.sh
CODECOV=1 ./scripts/simtest/cargo-simtest simtest
- name: Upload report to Codecov for simtest
- name: Upload report to Codecov for nextest
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: true

# TODO: Will enable this once we get this work
#
# - name: Run code coverage for simtest
# run: |
# ./scripts/simtest/install.sh
# CODECOV=1 ./scripts/simtest/cargo-simtest simtest

# - name: Upload report to Codecov for simtest
# uses: codecov/codecov-action@v3
# with:
# files: lcov.info
# fail_ci_if_error: true

notify:
name: Notify
needs: [cargo-llvm-cov]
Expand All @@ -92,6 +94,16 @@ jobs:
export sui_sha=$(git rev-parse HEAD)
echo "sui_sha=${sui_sha}" >> $GITHUB_ENV
- name: Get a branch name for a sui commit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export sui_branch_name=$(gh api -H 'Accept: application/vnd.github+json' /repos/MystenLabs/sui/commits/${{ env.SUI_SHA }}/branches-where-head --jq '.[].name' | head -n 1)
# if the commit is not the head of the branch, get it's base branch
[[ -z $sui_branch_name ]] && export sui_branch_name=$(gh api -H 'Accept: application/vnd.github+json' /repos/MystenLabs/sui/commits/${{ env.SUI_SHA }}/pulls --jq '.[].base.ref' | head -n 1)
echo "sui_branch_name=${sui_branch_name}" >> $GITHUB_ENV
echo "sui_branch_name=${sui_branch_name}"
- name: Get link to logs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -125,7 +137,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Sui commit: <https://github.com/MystenLabs/sui/commit/${{ env.SUI_SHA }}|${{ env.SUI_SHA }}> \nRun: <${{ env.GH_JOB_LINK }}|${{ github.run_id }}>"
"text": "Sui commit: <https://github.com/MystenLabs/sui/commit/${{ env.SUI_SHA }}|${{ env.SUI_SHA }}>\n sui branch: `${{ env.sui_branch_name }}`\nRun: <${{ env.GH_JOB_LINK }}|${{ github.run_id }}>"
}
},
{
Expand Down

0 comments on commit f243fd6

Please sign in to comment.