-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Luis Medel edited this page Nov 11, 2024
·
12 revisions
Where to go from here:
But first, maybe you want to see a real world example of Bluish usage. Here you have a basic CI workflow for a Python-based project (Bluish itself, by the way)
var:
PYTHON_VERSION: "3.11"
jobs:
lint:
name: Runs ruff and mypy
steps:
- run: |
ruff version
ruff check src/ test/
echo ""
mypy --version
mypy --ignore-missing-imports --python-version=${{ var.PYTHON_VERSION }} src/ test/
fix:
name: Reformats the code using ruff
depends_on:
- lint
steps:
- run: |
ruff version
ruff check --select I --fix src/ test/
ruff format src/
echo ""
test:
name: Run tests
steps:
- run: |
pytest -n 2
Having the previous config in a file called bluish.yaml
we can reformat our code by invoking the fix
job:
$ blu fix
If you know Github Actions or any other solution in this space, the example is self-explanatory. Note that the similarity with other tools is very superficial.