[FR] Update for Additional Endpoint Rule Coverage #55
Workflow file for this run
This file contains hidden or 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: Code checks | |
| on: | |
| pull_request: | |
| branches: [ "*" ] | |
| paths: | |
| - "*.py" | |
| - ".github/workflows/*" | |
| - "**/*.py" | |
| jobs: | |
| linting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| id: setup-python | |
| with: | |
| python-version: '3.12' | |
| - name: Set up cache | |
| uses: actions/cache@v4 | |
| id: cached-poetry-dependencies | |
| with: | |
| path: ./.venv | |
| key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-full | |
| - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| name: Create a virtual env | |
| run: python3 -m venv ./.venv | |
| - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| name: Install dependencies | |
| run: | | |
| . .venv/bin/activate | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| poetry config installer.parallel false | |
| poetry install --with dev --all-extras | |
| - name: Lint | |
| run: | | |
| . .venv/bin/activate | |
| poetry run ruff check ./cortado | |
| - name: Pyright | |
| run: | | |
| . .venv/bin/activate | |
| poetry run pyright ./cortado | |
| license-header-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Cortado files for a license header | |
| run: | | |
| bash ./scripts/check-license.sh ./cortado | |
| exit $? | |
| - name: Check test files for a license header | |
| run: | | |
| bash ./scripts/check-license.sh ./tests | |
| exit $? | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Set up cache | |
| uses: actions/cache@v4 | |
| id: cached-poetry-dependencies | |
| with: | |
| path: ./.venv | |
| key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-full | |
| - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| name: Create a virtual env | |
| run: python3 -m venv ./.venv | |
| - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| name: Install dependencies | |
| run: | | |
| . .venv/bin/activate | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| poetry config installer.parallel false | |
| poetry install --with dev --all-extras | |
| - name: Run tests | |
| run: | | |
| . .venv/bin/activate | |
| poetry run pytest tests/ | |
| dependency-check-for-minimal-package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| id: setup-python | |
| with: | |
| python-version: '3.12' | |
| - name: Set up cache | |
| uses: actions/cache@v4 | |
| id: cached-poetry-dependencies | |
| with: | |
| path: ./.venv | |
| key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-min | |
| - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| name: Create a virtual env | |
| run: python3 -m venv ./.venv | |
| - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| name: Install dependencies | |
| run: | | |
| . .venv/bin/activate | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| poetry config installer.parallel false | |
| # Skipping extras to see if RTA CLI is still executable | |
| poetry install --with dev | |
| - name: Verify RTA CLI | |
| run: | | |
| . .venv/bin/activate | |
| cortado-run-rta test-rta |