Skip to content

Merge pull request #411 from vil02/renovate/ruff-0.x #892

Merge pull request #411 from vil02/renovate/ruff-0.x

Merge pull request #411 from vil02/renovate/ruff-0.x #892

---
name: generate_and_upload_coverage_data
'on':
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
generate_and_upload_coverage_data:
name: generate_and_upload_coverage_data
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate codecov.yml file
run: |
./validate_codecov_yml.sh
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Set up Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: |
poetry install --with dev
- name: Install language dependencies
working-directory: ${{github.workspace}}/system_setup_scripts
run: |
sudo apt-get update
sudo ./install_all.sh
./install_all_no_sudo.sh
- name: Generate coverage data
run: |
./generate_coverage_data.sh \
--composition_chain_size=0 \
--iteration_size=0
- name: Sonar Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Upload coverage report to Codecov (tokenless)
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
- name: Upload coverage report to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
- name: Upload coverage report as an artifact
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: |
coverage.xml
htmlcov
if-no-files-found: error
retention-days: 5
...