Mirror of https://github.com/roostorg/osprey github.com/roostorg/osprey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: ci code quality to use pre-commit (#72)

Co-authored-by: ryanprior <4389854+ryanprior@users.noreply.github.com>

authored by

Caidan
ryanprior
and committed by
GitHub
5310b48b 2ba25537

+16 -25
+12 -7
.github/workflows/code-quality.yml
··· 32 32 - name: Install dependencies 33 33 run: uv sync --dev 34 34 35 - - name: Run ruff linting 36 - run: uv run ruff check . 35 + - name: Set PY 36 + run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV 37 + - uses: actions/cache@v4 38 + with: 39 + path: ~/.cache/pre-commit 40 + key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} 37 41 38 - - name: Run ruff formatting check 39 - run: uv run ruff format --check . 40 - 41 - - name: Run mypy type checking 42 - run: uv run mypy . 42 + - name: Run pre-commit python checks 43 + env: 44 + SKIP: prettier-osprey-ui 45 + run: | 46 + uv run pre-commit install --install-hooks 47 + uv run pre-commit run --show-diff-on-failure --color=always --all-files 43 48 44 49 ui-quality: 45 50 runs-on: ubuntu-24.04
-4
.pre-commit-config.yaml
··· 7 7 - repo: https://github.com/pre-commit/pre-commit-hooks 8 8 rev: v5.0.0 9 9 hooks: 10 - - id: trailing-whitespace 11 - exclude: .*/tests?/.*\.txt 12 - - id: end-of-file-fixer 13 - exclude: .*/tests?/.*\.txt 14 10 - id: check-case-conflict 15 11 - id: check-merge-conflict 16 12 - id: debug-statements
+2 -6
osprey_ui/base-tsconfig.json
··· 1 1 { 2 2 "compilerOptions": { 3 3 "paths": { 4 - "react": [ 5 - "./node_modules/@types/react" 6 - ], 7 - "react-router": [ 8 - "./node_modules/@types/react-router" 9 - ] 4 + "react": ["./node_modules/@types/react"], 5 + "react-router": ["./node_modules/@types/react-router"] 10 6 } 11 7 } 12 8 }
+2 -8
osprey_ui/tsconfig.json
··· 2 2 "extends": "./base-tsconfig.json", 3 3 "compilerOptions": { 4 4 "target": "es5", 5 - "lib": [ 6 - "dom", 7 - "dom.iterable", 8 - "esnext" 9 - ], 5 + "lib": ["dom", "dom.iterable", "esnext"], 10 6 "downlevelIteration": true, 11 7 "allowJs": true, 12 8 "skipLibCheck": true, ··· 23 19 "jsx": "react-jsx", 24 20 "noFallthroughCasesInSwitch": true 25 21 }, 26 - "include": [ 27 - "src" 28 - ] 22 + "include": ["src"] 29 23 }