From 8af71dd55265a006803d1ea0a58cbd5746f5de5a Mon Sep 17 00:00:00 2001 From: Artur Borecki Date: Thu, 28 Aug 2025 13:11:31 +0200 Subject: [PATCH] ci: remove irrelevant workflows --- .github/workflows/commit_checks.yaml | 104 --------------------------- .github/workflows/pr_checks.yaml | 48 ------------- 2 files changed, 152 deletions(-) delete mode 100644 .github/workflows/commit_checks.yaml delete mode 100644 .github/workflows/pr_checks.yaml diff --git a/.github/workflows/commit_checks.yaml b/.github/workflows/commit_checks.yaml deleted file mode 100644 index a5d8511..0000000 --- a/.github/workflows/commit_checks.yaml +++ /dev/null @@ -1,104 +0,0 @@ -name: Commit Checks - -on: - push: - branches: - - '*' - workflow_call: - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: ๐Ÿ”€ checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: "${{ secrets.GITHUB_TOKEN }}" - submodules: 'recursive' - - - name: ๐Ÿ“ฆ install uv - uses: astral-sh/setup-uv@v5 - - - name: ๐Ÿ python - uses: actions/setup-python@v5 - with: - python-version-file: "pyproject.toml" - - - name: ๐Ÿ“ฆ sync depedencies - run: | - uv sync - uv sync --group test - - - name: ๐Ÿงช run tests - id: test - run: | - uv run pytest -v - coverage: - name: Check coverage - runs-on: ubuntu-latest - steps: - - name: ๐Ÿ”€ checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: "${{ secrets.GITHUB_TOKEN }}" - submodules: 'recursive' - - - name: ๐Ÿ“ฆ install uv - uses: astral-sh/setup-uv@v5 - - - name: ๐Ÿ python - uses: actions/setup-python@v5 - with: - python-version-file: "pyproject.toml" - - - name: ๐Ÿ“ฆ sync depedencies - run: | - uv sync - uv sync --group test - - - name: ๐Ÿงช run tests - id: test - run: | - uv run pytest -v --cov - - - name: ๐Ÿ“Š generate coverage report - if: always() - run: | - uv run coverage json - cov_percent=$(jq '.totals.percent_covered' coverage.json) - cov_percent_rounded=$(python3 -c "print(round(${cov_percent}, 2))") - cov_lines=$(jq '.totals.covered_lines' coverage.json) - cov_missing=$(jq '.totals.missing_lines' coverage.json) - cov_total=$(jq '.totals.num_statements' coverage.json) - cov_excluded=$(jq '.totals.excluded_lines' coverage.json) - report_success=$(python3 -c "print(str(${cov_percent} == 100).lower())") - - if (( $(echo "$cov_percent >= 100" | bc -l) )); then - badge_color="brightgreen" - elif (( $(echo "$cov_percent >= 90" | bc -l) )); then - badge_color="yellow" - else - badge_color="red" - fi - - echo "## ๐Ÿ“Š Coverage Report" >> $GITHUB_STEP_SUMMARY - - echo "![Coverage: $cov_percent_rounded%](https://img.shields.io/badge/Coverage-$cov_percent_rounded%25-$badge_color)" >> $GITHUB_STEP_SUMMARY - - echo "| Total Lines | Covered | Missing | Excluded |" >> $GITHUB_STEP_SUMMARY - echo "|-------------|---------|---------|----------|" >> $GITHUB_STEP_SUMMARY - echo "| $cov_total | $cov_lines | $cov_missing | $cov_excluded |" >> $GITHUB_STEP_SUMMARY - - echo "
" >> $GITHUB_STEP_SUMMARY - echo "Details" >> $GITHUB_STEP_SUMMARY - echo '' >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - uv run coverage report >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo '' >> $GITHUB_STEP_SUMMARY - echo "
" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml deleted file mode 100644 index 537cf2d..0000000 --- a/.github/workflows/pr_checks.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: PR Checks - -on: - pull_request: - branches: - - '*' - -jobs: - comment_coverage: - name: Comment coverage on PR - runs-on: ubuntu-latest - steps: - - name: ๐Ÿ”€ checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: "${{ secrets.GITHUB_TOKEN }}" - submodules: 'recursive' - - - name: ๐Ÿ“ฆ install uv - uses: astral-sh/setup-uv@v5 - - - name: ๐Ÿ python - uses: actions/setup-python@v5 - with: - python-version-file: "pyproject.toml" - - - name: ๐Ÿ“ฆ sync depedencies - run: | - uv sync - uv sync --group test - - - - name: configure git - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: ๐Ÿงช run coverage - run: | - uv run pytest --cov --junitxml=pytest.xml --cov-report=term-missing | tee pytest-coverage.txt - continue-on-error: true - - - name: ๐Ÿ“Š comment coverage - uses: MishaKav/pytest-coverage-comment@main - with: - pytest-coverage-path: pytest-coverage.txt - junitxml-path: pytest.xml