diff --git a/.bluish/ci.yaml b/.bluish/ci.yaml index f44d5f3..1717714 100644 --- a/.bluish/ci.yaml +++ b/.bluish/ci.yaml @@ -3,8 +3,15 @@ var: python_version: "3.11" jobs: + _prepare_lint: + name: Prepare linters + steps: + - run: | + pip3 install -r requirements-linting.txt + lint: name: Runs ruff and mypy + depends_on: [_prepare_lint] steps: - run: | ruff version @@ -15,8 +22,7 @@ jobs: fix: name: Reformats the code using ruff - depends_on: - - lint + depends_on: [lint] steps: - run: | ruff version @@ -24,14 +30,22 @@ jobs: ruff format src/ echo "" + _prepare_tests: + name: Prepare tests + steps: + - run: | + pip3 install -r requirements-testing.txt + test: name: Runs pytest + depends_on: [_prepare_tests] steps: - run: | pytest -n 2 test-all: name: Runs pytest + depends_on: [_prepare_tests] steps: - run: | pytest -n 2 --run-docker diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c078f11..a0e29d2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: Fire the publish workflow using Bluish +name: Deploy on: [push, workflow_dispatch] @@ -10,6 +10,5 @@ jobs: - uses: actions/checkout@v4 - uses: luismedel/setup-bluish@v3 - run: | - pip3 install -r requirements-testing.txt - - run: | + blu ci:lint blu ci:test-all