From 04b2b5cfc15a4f3ddea29ef0be0dfd5338068337 Mon Sep 17 00:00:00 2001 From: arodindev Date: Sun, 4 Aug 2024 09:45:31 +0200 Subject: [PATCH] add(cicd): linting --- .../workflows/{build-image.yaml => cd.yaml} | 2 +- .github/workflows/ci.yaml | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) rename .github/workflows/{build-image.yaml => cd.yaml} (97%) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/build-image.yaml b/.github/workflows/cd.yaml similarity index 97% rename from .github/workflows/build-image.yaml rename to .github/workflows/cd.yaml index 862b1d5..be95f4a 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/cd.yaml @@ -1,4 +1,4 @@ -name: publish +name: CD on: push: tags: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..6dec22e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +name: CI +on: + push: + +jobs: + ci: + strategy: + fail-fast: false + matrix: + python-version: ["3.11"] + poetry-version: ["1.8.2"] + os: [ubuntu-22.04, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install poetry + uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Install dev dependencies (lint) + run: poetry install -v --no-interaction --no-root --only dev + - name: Run linting + run: poetry run isort src \ + poetry run ruff check src --fix \ + poetry run ruff format src \ No newline at end of file