Bump ruff from 0.1.14 to 0.4.1 in /backend #403
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: Lint Backend | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: | |
- "backend/**" | |
- ".github/workflows/lint-backend.yaml" | |
pull_request: | |
branches: [main] | |
paths: | |
- "backend/**" | |
- ".github/workflows/lint-backend.yaml" | |
jobs: | |
lint: | |
name: Lint Code | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
defaults: | |
run: | |
# Step into backend | |
working-directory: ./backend | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry==1.7.1 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: poetry | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-ansi | |
- name: Ruff lint | |
run: poetry run ruff check . | |
- name: Ruff format | |
run: poetry run ruff format . --check --diff | |
codeql: | |
name: CodeQL Analysis | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: python | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |