chore: refactor next_launch view to improve performance and remove un… #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Python Code Checker | |
on: | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- '**.py' | |
permissions: | |
checks: write | |
contents: write | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Setup Dependencies | |
uses: ./.github/actions/setup-poetry | |
with: | |
repo_username: ${{ secrets.PRIVATE_USERNAME }} | |
repo_password: ${{ secrets.PRIVATE_PASSWORD }} | |
- name: Run linters | |
run: | | |
poetry run ruff format --check | |
lint: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Setup Dependencies | |
uses: ./.github/actions/setup-poetry | |
with: | |
repo_username: ${{ secrets.PRIVATE_USERNAME }} | |
repo_password: ${{ secrets.PRIVATE_PASSWORD }} | |
- name: Run linters | |
run: | | |
poetry run ruff check | |
report: | |
needs: [lint, format] | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0 | |
- name: Setup Dependencies | |
uses: ./.github/actions/setup-poetry | |
with: | |
repo_username: ${{ secrets.PRIVATE_USERNAME }} | |
repo_password: ${{ secrets.PRIVATE_PASSWORD }} | |
- name: Run reporters | |
run: | | |
echo "# Code condition report" >> $GITHUB_STEP_SUMMARY | |
echo "## Basic code statistics (radon)" >> $GITHUB_STEP_SUMMARY | |
echo "Class | Function | Method " >> $GITHUB_STEP_SUMMARY | |
echo "---|---|---" >> $GITHUB_STEP_SUMMARY | |
echo "C | F | M " >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "Good | Bad | Worst " >> $GITHUB_STEP_SUMMARY | |
echo "---|---|---" >> $GITHUB_STEP_SUMMARY | |
echo "A | C | F " >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "### Maintainability Index" >> $GITHUB_STEP_SUMMARY | |
poetry run radon mi . >> $GITHUB_STEP_SUMMARY | |
echo "### Cyclomatic Complexity" >> $GITHUB_STEP_SUMMARY | |
poetry run radon cc --total-average . >> $GITHUB_STEP_SUMMARY | |
echo "## Cohesion levels (cohesion)" >> $GITHUB_STEP_SUMMARY | |
poetry run cohesion -d . >> $GITHUB_STEP_SUMMARY | |
echo "## Possibly dead code (vulture)" >> $GITHUB_STEP_SUMMARY | |
poetry run vulture . >> $GITHUB_STEP_SUMMARY || true | |