From 4790fc2e455487ce5fc7e38163c0ccb743a1e522 Mon Sep 17 00:00:00 2001 From: Vasily Shamporov Date: Wed, 16 Aug 2023 18:04:57 +0200 Subject: [PATCH] Checkout for coverage upload --- .github/workflows/post_pr_merge.yml | 5 ++++- .github/workflows/precommit.yml | 35 ++++++++++++++++------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/post_pr_merge.yml b/.github/workflows/post_pr_merge.yml index 02b70586290..0f12ef08a0e 100644 --- a/.github/workflows/post_pr_merge.yml +++ b/.github/workflows/post_pr_merge.yml @@ -21,6 +21,9 @@ jobs: if: github.event.pull_request.merged == true runs-on: ubuntu-20.04 steps: + - uses: actions/checkout@v3 # codecov uploader demands that the scanned files be present when uploading + with: + ref: ${{ github.event.pull_request.merge_commit_sha }} - uses: dawidd6/action-download-artifact@v2 with: workflow: precommit.yml @@ -34,4 +37,4 @@ jobs: # github.event.pull_request.merge_commit_sha is the fresh commit in the develop, # provided that github.event.pull_request.merged == true - ./codecov -f ./coverage.xml -t ${{ secrets.CODECOV_TOKEN }} -C ${{ github.event.pull_request.merge_commit_sha }} -B develop \ No newline at end of file + ./codecov -f ./coverage.xml -t ${{ secrets.CODECOV_TOKEN }} -C ${{ github.event.pull_request.merge_commit_sha }} -B develop -n "codecov-onnx" \ No newline at end of file diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index 12cbe553204..38310af5955 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -11,18 +11,23 @@ jobs: onnx: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - with: - lfs: true - - uses: actions/setup-python@v3 - with: - python-version: 3.8.10 - - name: Install NNCF and test requirements - run: make install-onnx-test - - name: Run ONNX precommit test scope - run: make test-onnx - - name: Upload coverage report as artifact - uses: actions/upload-artifact@v3 - with: - name: coverage_xml # optional - path: ./coverage.xml \ No newline at end of file + - uses: actions/checkout@v3 + with: + lfs: true + - uses: actions/setup-python@v3 + with: + python-version: 3.8.10 + - name: Install NNCF and test requirements + run: make install-onnx-test + - name: Run ONNX precommit test scope + run: make test-onnx + - name: Upload coverage report as artifact + uses: actions/upload-artifact@v3 + with: + name: coverage_xml # optional + path: ./coverage.xml + - name: Upload coverage report to codecov + uses: codecov/codecov-action + with: + token: ${{ secrets.CODECOV_TOKEN }} + name: codecov-onnx # optional