Skip to content

Commit

Permalink
RSDK-9240: Remove github action code coverage stuff we do not use. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dgottlieb authored Nov 11, 2024
1 parent 417465f commit 900b4fd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 88 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/code-coverage-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,6 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request_target' && github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download Code Coverage
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
name: pr-code-coverage

- name: Restore Environment
run: cat pr.env >> "${GITHUB_ENV}"

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
with:
header: code-coverage
number: ${{ env.PR_NUMBER }}
recreate: true
path: code-coverage-results.md

- name: Add AppImage Links
if: ${{ env.APPIMAGE }}
uses: marocchino/sticky-pull-request-comment@v2
Expand Down
71 changes: 0 additions & 71 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,77 +84,6 @@ jobs:
path: json.log
retention-days: 30

test_coverage:
name: Go Coverage Tests
if: false # toggle this off, delete after 3/1/24 if nobody misses it
# note: we split 'test_go' and 'test_coverage' steps because running race-detection + covprofile simultaneously is slow enough to cause flakes
strategy:
fail-fast: false
matrix:
include:
- arch: ubuntu-large
image: ghcr.io/viamrobotics/rdk-devenv:amd64-cache
platform: linux/amd64
platform_name: linux-amd64
- arch: ubuntu-large-arm
image: ghcr.io/viamrobotics/rdk-devenv:arm64-cache
platform: linux/arm64
platform_name: linux-arm64
runs-on: ${{ matrix.arch }}
container:
image: ${{ matrix.image }}
options: --platform ${{ matrix.platform }}
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.event.ref }}
fetch-depth: ${{ github.event_name == 'pull_request_target' && '0' || '1' }} # 0 aka full history, so we can analyze history for coverage

- name: Set main env vars
if: github.event_name != 'pull_request_target'
run: |
echo "GITHUB_X_HEAD_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
echo "GITHUB_X_HEAD_REF=${GITHUB_REF_NAME}" >> $GITHUB_ENV
- name: Set PR env vars
if: github.event_name == 'pull_request_target'
env:
GITHUB_HEAD_REF_SAN: ${{ github.event.pull_request.head.label }}
run: |
echo "GITHUB_X_HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
echo "GITHUB_X_HEAD_REF=${GITHUB_HEAD_REF_SAN}" >> $GITHUB_ENV
echo "GITHUB_X_PR_BASE_SHA=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV
echo "GITHUB_X_PR_BASE_REF=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: chown
run: chown -R testbot:testbot .

- name: Verify no uncommitted changes from "make build-go lint-go generate-go"
run: |
sudo -Hu testbot bash -lc 'git init && git add . && make build-go lint-go generate-go'
GEN_DIFF=$(git status -s)
if [ -n "$GEN_DIFF" ]; then
echo '"make build-go lint-go generate-go" resulted in changes not in git' 1>&2
git status
exit 1
fi
- name: Run go coverage tests
run: |
sudo --preserve-env=MONGODB_TEST_OUTPUT_URI,GITHUB_SHA,GITHUB_RUN_ID,GITHUB_RUN_NUMBER,GITHUB_RUN_ATTEMPT,GITHUB_X_PR_BASE_SHA,GITHUB_X_PR_BASE_REF,GITHUB_X_HEAD_REF,GITHUB_X_HEAD_SHA,GITHUB_REPOSITORY -Hu testbot bash -lc 'make cover-only'
- name: Upload code coverage
uses: actions/upload-artifact@v4
with:
name: pr-code-coverage
path: |
pr.env
code-coverage-results.md
retention-days: 1

test32:
name: Go 32-bit Unit Tests
runs-on: ubuntu-large-arm
Expand Down

0 comments on commit 900b4fd

Please sign in to comment.