Skip to content

Commit

Permalink
Add just recipe to lint justfile and fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SRv6d committed Sep 15, 2024
1 parent 869d1c9 commit 7db2891
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ default: check-lockfile lint type-check test

# Check if the lockfile is up to date
check-lockfile:
uv lock --locked
uv lock --locked

# Lint code and check formatting
lint +dirs="src tests": lint-justfile
uv run ruff check {{ dirs }}
uv run ruff format --check {{ dirs }}
uv run ruff check {{ dirs }}
uv run ruff format --check {{ dirs }}

lint-justfile:
just --check --fmt --unstable
just --check --fmt --unstable

# Validate static types using mypy
type-check +dirs="src":
uv run mypy {{ dirs }}
uv run mypy {{ dirs }}

# Run tests using pytest
test $COV=env("CI", "false") $FRR_VERSION=FRR_LATEST_MAJOR_VERSION:
#!/usr/bin/env bash
set -euxo pipefail
#!/usr/bin/env bash
set -euxo pipefail
args=()
( $COV == "true" ) && args+=( "--cov" )
uv run pytest tests ${args[@]}
args=()
( $COV == "true" ) && args+=( "--cov" )
uv run pytest tests ${args[@]}

if [ $COV = "true" ]; then
uv run coverage xml
fi
if [ $COV = "true" ]; then
uv run coverage xml
fi

0 comments on commit 7db2891

Please sign in to comment.