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

Codecov Tokenless upload #1155

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
51 changes: 28 additions & 23 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,6 @@ env:
node-version: '18.x'

jobs:
workflow-info:
runs-on: ubuntu-latest
steps:
- name: Create JSON Artifact
run: |
echo '{' > workflow-info.json
echo ' "pr_number": "${{ github.event.pull_request.number }}",' >> workflow-info.json
echo ' "commit": "${{ github.event.pull_request.head.sha || github.event.after || github.sha }}",' >> workflow-info.json
echo ' "branch": "${{ github.ref }}",' >> workflow-info.json
echo ' "commit_parent": "${{ github.event.pull_request.base.sha || github.event.before || github.base.sha }}",' >> workflow-info.json
echo ' "build_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",' >> workflow-info.json
echo ' "build": "${{ github.run_id }}"' >> workflow-info.json
echo '}' >> workflow-info.json
echo "workflow-info.json created"
- name: Upload JSON Artifact
uses: actions/upload-artifact@v4
with:
name: workflow-info
path: workflow-info.json


style-check:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -79,19 +58,24 @@ jobs:
working-directory: ${{ env.WORKING_DIR }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Run Tests
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- run: |
python3 -m pip install --upgrade pipenv
pipenv install --deploy --dev
pipenv run test
pipenv run coverage xml
- name: Generate Coverage Report
if: always()
run: pipenv run coverage xml
- name: Get Sanitized Name
if: always()
env:
PY_PROJECT: ${{ matrix.py-project }}
run: echo "SANITIZED_PY_PROJECT=${PY_PROJECT/\//-}" >> $GITHUB_ENV
- name: Upload Coverage Reports
if: always()
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
Expand Down Expand Up @@ -129,6 +113,7 @@ jobs:
**/build/reports/tests/
**/reports/jacoco/mergedReport/
- name: Upload Coverage Reports
if: always()
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
Expand Down Expand Up @@ -235,6 +220,26 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

report-codecov:
needs:
- gradle-tests
- console-python-tests
if: always()
runs-on: ubuntu-latest
steps:
- name: Download Coverage Artifacts
uses: actions/download-artifact@v4
with:
path: ./coverage-reports
pattern: coverage-reports-*
- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
AndreKurait marked this conversation as resolved.
Show resolved Hide resolved
files: /**/coverage-reports/**/*.*
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

all-ci-checks-pass:
needs:
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/codecov-publish.yml

This file was deleted.

Loading