From 4100d986551a642e179eeabc2dc7f24da415b791 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 11:28:55 +0300 Subject: [PATCH 01/16] refactor: git checks task_1067 --- .github/workflows/checks.yml | 70 ++++++++++++++++++++++-------------- interface | 2 +- 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 01b92ef8b..2cbda011e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -8,7 +8,7 @@ env: REPO: ${{ github.repository }} jobs: - ruff_linter: + build_linters: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,55 +18,71 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: build linters + - name: Build and push linters image env: - TAG: ghcr.io/${{ env.REPO }}_linters:latest - NEW_TAG: linter - run: docker build --target=runtime -f .docker/lint.Dockerfile . -t $NEW_TAG --cache-to type=gha,mode=max --cache-from $TAG --build-arg BUILDKIT_INLINE_CACHE=1 - - name: Run linters + CACHE_TAG: ghcr.io/${{ env.REPO }}_linters:latest + TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} + run: | + docker build \ + --target=runtime \ + -f .docker/lint.Dockerfile \ + . \ + -t $TAG \ + --cache-to type=gha,mode=max \ + --cache-from $CACHE_TAG \ + --build-arg BUILDKIT_INLINE_CACHE=1 + docker push $TAG + + ruff_linter: + runs-on: ubuntu-latest + needs: build_linters + steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Pull and run ruff check env: - NEW_TAG: linter - run: docker run $NEW_TAG ruff check --output-format=github . + TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} + run: | + docker pull $TAG + docker run $TAG ruff check --output-format=github . ruff_format: runs-on: ubuntu-latest + needs: build_linters steps: - - uses: actions/checkout@v4 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: build linters + - name: Pull and run ruff format env: - TAG: ghcr.io/${{ env.REPO }}_linters:latest - NEW_TAG: linter - run: docker build --target=runtime -f .docker/lint.Dockerfile . -t $NEW_TAG --cache-to type=gha,mode=max --cache-from $TAG --build-arg BUILDKIT_INLINE_CACHE=1 - - name: Run linters - env: - NEW_TAG: linter - run: docker run $NEW_TAG ruff format --check + TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} + run: | + docker pull $TAG + docker run $TAG ruff format --check mypy: runs-on: ubuntu-latest + needs: build_linters steps: - - uses: actions/checkout@v4 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: build linters - env: - TAG: ghcr.io/${{ env.REPO }}_linters:latest - NEW_TAG: linter - run: docker build --target=runtime -f .docker/lint.Dockerfile . -t $NEW_TAG --cache-to type=gha,mode=max --cache-from $TAG --build-arg BUILDKIT_INLINE_CACHE=1 - - name: Run linters + - name: Pull and run mypy env: - NEW_TAG: linter - run: docker run $NEW_TAG mypy . + TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} + run: | + docker pull $TAG + docker run $TAG mypy . tests: runs-on: ubuntu-latest @@ -86,4 +102,4 @@ jobs: - name: Run tests env: TAG: tests - run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test \ No newline at end of file + run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test diff --git a/interface b/interface index 242c01f0f..094bf0367 160000 --- a/interface +++ b/interface @@ -1 +1 @@ -Subproject commit 242c01f0f26a5080beef14523f9dd9dfab3c89ec +Subproject commit 094bf0367c26c574310e43714a1adfcf61ca57a1 From 51f7e92974e228643300edcd3cf95680396b942a Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 11:42:23 +0300 Subject: [PATCH 02/16] fix --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2cbda011e..b2f3c9c88 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,7 +5,7 @@ on: pull_request: null env: - REPO: ${{ github.repository }} + REPO: ${{ lower(github.repository) }} jobs: build_linters: From 806161a412bf7fd3ffeb88baf71024896980ebe2 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 12:53:42 +0300 Subject: [PATCH 03/16] fix --- .github/workflows/checks.yml | 58 ++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b2f3c9c88..d3d165841 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,11 +5,13 @@ on: pull_request: null env: - REPO: ${{ lower(github.repository) }} + REPO: ${{ github.repository }} jobs: build_linters: runs-on: ubuntu-latest + outputs: + image_tag: ${{ steps.meta.outputs.tags }} steps: - uses: actions/checkout@v4 - name: Login to GitHub Container Registry @@ -18,20 +20,24 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}_linters + tags: type=sha - name: Build and push linters image - env: - CACHE_TAG: ghcr.io/${{ env.REPO }}_linters:latest - TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} - run: | - docker build \ - --target=runtime \ - -f .docker/lint.Dockerfile \ - . \ - -t $TAG \ - --cache-to type=gha,mode=max \ - --cache-from $CACHE_TAG \ - --build-arg BUILDKIT_INLINE_CACHE=1 - docker push $TAG + uses: docker/build-push-action@v6 + with: + context: . + file: .docker/lint.Dockerfile + target: runtime + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha,mode=max + push: true ruff_linter: runs-on: ubuntu-latest @@ -43,12 +49,8 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Pull and run ruff check - env: - TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} - run: | - docker pull $TAG - docker run $TAG ruff check --output-format=github . + - name: Run ruff check + run: docker run ${{ needs.build_linters.outputs.image_tag }} ruff check --output-format=github . ruff_format: runs-on: ubuntu-latest @@ -60,12 +62,8 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Pull and run ruff format - env: - TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} - run: | - docker pull $TAG - docker run $TAG ruff format --check + - name: Run ruff format + run: docker run ${{ needs.build_linters.outputs.image_tag }} ruff format --check mypy: runs-on: ubuntu-latest @@ -77,12 +75,8 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Pull and run mypy - env: - TAG: ghcr.io/${{ env.REPO }}_linters:${{ github.sha }} - run: | - docker pull $TAG - docker run $TAG mypy . + - name: Run mypy + run: docker run ${{ needs.build_linters.outputs.image_tag }} mypy . tests: runs-on: ubuntu-latest From 1bbc44b220765c9395472d3887f07fa29ea1113d Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 13:06:29 +0300 Subject: [PATCH 04/16] fix --- .github/workflows/checks.yml | 96 ++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d3d165841..7f094e700 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -10,90 +10,92 @@ env: jobs: build_linters: runs-on: ubuntu-latest - outputs: - image_tag: ${{ steps.meta.outputs.tags }} steps: - uses: actions/checkout@v4 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }}_linters - tags: type=sha - - name: Build and push linters image + - name: Build linters image with cache uses: docker/build-push-action@v6 with: context: . file: .docker/lint.Dockerfile target: runtime - tags: ${{ steps.meta.outputs.tags }} cache-from: type=gha cache-to: type=gha,mode=max - push: true + push: false ruff_linter: runs-on: ubuntu-latest needs: build_linters steps: - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build image from cache + uses: docker/build-push-action@v6 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + context: . + file: .docker/lint.Dockerfile + target: runtime + cache-from: type=gha + load: true + tags: linters:local - name: Run ruff check - run: docker run ${{ needs.build_linters.outputs.image_tag }} ruff check --output-format=github . + run: docker run linters:local ruff check --output-format=github . ruff_format: runs-on: ubuntu-latest needs: build_linters steps: - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build image from cache + uses: docker/build-push-action@v6 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + context: . + file: .docker/lint.Dockerfile + target: runtime + cache-from: type=gha + load: true + tags: linters:local - name: Run ruff format - run: docker run ${{ needs.build_linters.outputs.image_tag }} ruff format --check + run: docker run linters:local ruff format --check mypy: runs-on: ubuntu-latest needs: build_linters steps: - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build image from cache + uses: docker/build-push-action@v6 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + context: . + file: .docker/lint.Dockerfile + target: runtime + cache-from: type=gha + load: true + tags: linters:local - name: Run mypy - run: docker run ${{ needs.build_linters.outputs.image_tag }} mypy . + run: docker run linters:local mypy . tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build tests image + uses: docker/build-push-action@v6 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: build tests - env: - CACHE: ghcr.io/${{ env.REPO }}_test:latest - TAG: tests - run: docker build --target=runtime -f .docker/test.Dockerfile . -t $TAG --cache-to type=gha,mode=max --cache-from $CACHE --build-arg BUILDKIT_INLINE_CACHE=1 + context: . + file: .docker/test.Dockerfile + target: runtime + tags: tests + cache-from: type=gha + cache-to: type=gha,mode=max + load: true - name: Run tests - env: - TAG: tests run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test From 1ab4fa95c1cc7b40dd55c6929dbf19e4188ff404 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 13:11:31 +0300 Subject: [PATCH 05/16] fix --- .github/workflows/checks.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7f094e700..fe54eabda 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -85,17 +85,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build tests image - uses: docker/build-push-action@v6 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 with: - context: . - file: .docker/test.Dockerfile - target: runtime - tags: tests - cache-from: type=gha - cache-to: type=gha,mode=max - load: true + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: build tests + env: + CACHE: ghcr.io/${{ env.REPO }}_test:latest + TAG: tests + run: docker build --target=runtime -f .docker/test.Dockerfile . -t $TAG --cache-to type=gha,mode=max --cache-from $CACHE --build-arg BUILDKIT_INLINE_CACHE=1 - name: Run tests + env: + TAG: tests run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test From 69f4d6a37fe66a22d2c423d8620d420458d9c864 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 14:03:57 +0300 Subject: [PATCH 06/16] fix --- .github/workflows/checks.yml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index fe54eabda..16e9fde5a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -8,7 +8,7 @@ env: REPO: ${{ github.repository }} jobs: - build_linters: + build_base: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -26,7 +26,7 @@ jobs: ruff_linter: runs-on: ubuntu-latest - needs: build_linters + needs: build_base steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -45,7 +45,7 @@ jobs: ruff_format: runs-on: ubuntu-latest - needs: build_linters + needs: build_base steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -64,7 +64,7 @@ jobs: mypy: runs-on: ubuntu-latest - needs: build_linters + needs: build_base steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -83,20 +83,19 @@ jobs: tests: runs-on: ubuntu-latest + needs: build_base steps: - uses: actions/checkout@v4 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build image from cache + uses: docker/build-push-action@v6 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: build tests - env: - CACHE: ghcr.io/${{ env.REPO }}_test:latest - TAG: tests - run: docker build --target=runtime -f .docker/test.Dockerfile . -t $TAG --cache-to type=gha,mode=max --cache-from $CACHE --build-arg BUILDKIT_INLINE_CACHE=1 + context: . + file: .docker/test.Dockerfile + target: runtime + cache-from: type=gha + load: true + tags: tests:local - name: Run tests - env: - TAG: tests run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test From 6dff822556099f68a49ac43c36b9f2d707344b4e Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 14:18:04 +0300 Subject: [PATCH 07/16] fix --- .github/workflows/checks.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 16e9fde5a..dc8651328 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -84,6 +84,8 @@ jobs: tests: runs-on: ubuntu-latest needs: build_base + env: + TAG: tests:local steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -96,6 +98,6 @@ jobs: target: runtime cache-from: type=gha load: true - tags: tests:local + tags: ${{ env.TAG }} - name: Run tests run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test From 46406ee6a7b3bd433263df0843d5ddceea23e4b2 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 17:31:14 +0300 Subject: [PATCH 08/16] refactor --- .github/workflows/checks.yml | 86 ++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 49 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index dc8651328..a2a8f2ecc 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build linters image with cache + - name: Build base image uses: docker/build-push-action@v6 with: context: . @@ -22,82 +22,70 @@ jobs: target: runtime cache-from: type=gha cache-to: type=gha,mode=max - push: false + outputs: type=docker,dest=/tmp/base.tar + tags: base:latest + - name: Upload base image + uses: actions/upload-artifact@v4 + with: + name: base-image + path: /tmp/base.tar + retention-days: 1 ruff_linter: runs-on: ubuntu-latest needs: build_base steps: - - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build image from cache - uses: docker/build-push-action@v6 + - name: Download base image + uses: actions/download-artifact@v4 with: - context: . - file: .docker/lint.Dockerfile - target: runtime - cache-from: type=gha - load: true - tags: linters:local + name: base-image + path: /tmp + - name: Load image + run: docker load -i /tmp/base.tar - name: Run ruff check - run: docker run linters:local ruff check --output-format=github . + run: docker run base:latest ruff check --output-format=github . ruff_format: runs-on: ubuntu-latest needs: build_base steps: - - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build image from cache - uses: docker/build-push-action@v6 + - name: Download base image + uses: actions/download-artifact@v4 with: - context: . - file: .docker/lint.Dockerfile - target: runtime - cache-from: type=gha - load: true - tags: linters:local + name: base-image + path: /tmp + - name: Load image + run: docker load -i /tmp/base.tar - name: Run ruff format - run: docker run linters:local ruff format --check + run: docker run base:latest ruff format --check mypy: runs-on: ubuntu-latest needs: build_base steps: - - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build image from cache - uses: docker/build-push-action@v6 + - name: Download base image + uses: actions/download-artifact@v4 with: - context: . - file: .docker/lint.Dockerfile - target: runtime - cache-from: type=gha - load: true - tags: linters:local + name: base-image + path: /tmp + - name: Load image + run: docker load -i /tmp/base.tar - name: Run mypy - run: docker run linters:local mypy . + run: docker run base:latest mypy . tests: runs-on: ubuntu-latest needs: build_base env: - TAG: tests:local + TAG: base:latest steps: - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build image from cache - uses: docker/build-push-action@v6 + - name: Download base image + uses: actions/download-artifact@v4 with: - context: . - file: .docker/test.Dockerfile - target: runtime - cache-from: type=gha - load: true - tags: ${{ env.TAG }} + name: base-image + path: /tmp + - name: Load image + run: docker load -i /tmp/base.tar - name: Run tests run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test From 47a80c72f4ecac3d31a7bbb300292dcc31650763 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 17:34:31 +0300 Subject: [PATCH 09/16] fix --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a2a8f2ecc..e427a71bb 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -83,6 +83,7 @@ jobs: - name: Download base image uses: actions/download-artifact@v4 with: + tags: ${{ env.TAG }} name: base-image path: /tmp - name: Load image From aa3c66be4619e1959664e7e7295b6d20cbf508e5 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 17:36:55 +0300 Subject: [PATCH 10/16] fix --- .github/workflows/checks.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e427a71bb..f8b21c8a0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -24,12 +24,28 @@ jobs: cache-to: type=gha,mode=max outputs: type=docker,dest=/tmp/base.tar tags: base:latest + - name: Build tests image + uses: docker/build-push-action@v6 + with: + context: . + file: .docker/test.Dockerfile + target: runtime + cache-from: type=gha + cache-to: type=gha,mode=max + outputs: type=docker,dest=/tmp/tests.tar + tags: tests:latest - name: Upload base image uses: actions/upload-artifact@v4 with: name: base-image path: /tmp/base.tar retention-days: 1 + - name: Upload tests image + uses: actions/upload-artifact@v4 + with: + name: tests-image + path: /tmp/tests.tar + retention-days: 1 ruff_linter: runs-on: ubuntu-latest @@ -77,16 +93,15 @@ jobs: runs-on: ubuntu-latest needs: build_base env: - TAG: base:latest + TAG: tests:latest steps: - uses: actions/checkout@v4 - - name: Download base image + - name: Download tests image uses: actions/download-artifact@v4 with: - tags: ${{ env.TAG }} - name: base-image + name: tests-image path: /tmp - name: Load image - run: docker load -i /tmp/base.tar + run: docker load -i /tmp/tests.tar - name: Run tests run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test From 2bcd9adacf6fbb4ab9d5e90c4610d77fa01c761b Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 17:39:27 +0300 Subject: [PATCH 11/16] rename --- .github/workflows/checks.yml | 77 ++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f8b21c8a0..87e252103 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -8,13 +8,13 @@ env: REPO: ${{ github.repository }} jobs: - build_base: + build_linter: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build base image + - name: Build linter image uses: docker/build-push-action@v6 with: context: . @@ -22,8 +22,35 @@ jobs: target: runtime cache-from: type=gha cache-to: type=gha,mode=max - outputs: type=docker,dest=/tmp/base.tar - tags: base:latest + outputs: type=docker,dest=/tmp/linter.tar + tags: linter:latest + - name: Upload linter image + uses: actions/upload-artifact@v4 + with: + name: linter-image + path: /tmp/linter.tar + retention-days: 1 + + ruff_linter: + runs-on: ubuntu-latest + needs: build_linter + steps: + - name: Download linter image + uses: actions/download-artifact@v4 + with: + name: linter-image + path: /tmp + - name: Load image + run: docker load -i /tmp/linter.tar + - name: Run ruff check + run: docker run linter:latest ruff check --output-format=github . + + build_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build tests image uses: docker/build-push-action@v6 with: @@ -34,12 +61,6 @@ jobs: cache-to: type=gha,mode=max outputs: type=docker,dest=/tmp/tests.tar tags: tests:latest - - name: Upload base image - uses: actions/upload-artifact@v4 - with: - name: base-image - path: /tmp/base.tar - retention-days: 1 - name: Upload tests image uses: actions/upload-artifact@v4 with: @@ -47,51 +68,37 @@ jobs: path: /tmp/tests.tar retention-days: 1 - ruff_linter: - runs-on: ubuntu-latest - needs: build_base - steps: - - name: Download base image - uses: actions/download-artifact@v4 - with: - name: base-image - path: /tmp - - name: Load image - run: docker load -i /tmp/base.tar - - name: Run ruff check - run: docker run base:latest ruff check --output-format=github . - ruff_format: runs-on: ubuntu-latest - needs: build_base + needs: build_linter steps: - - name: Download base image + - name: Download linter image uses: actions/download-artifact@v4 with: - name: base-image + name: linter-image path: /tmp - name: Load image - run: docker load -i /tmp/base.tar + run: docker load -i /tmp/linter.tar - name: Run ruff format - run: docker run base:latest ruff format --check + run: docker run linter:latest ruff format --check mypy: runs-on: ubuntu-latest - needs: build_base + needs: build_linter steps: - - name: Download base image + - name: Download linter image uses: actions/download-artifact@v4 with: - name: base-image + name: linter-image path: /tmp - name: Load image - run: docker load -i /tmp/base.tar + run: docker load -i /tmp/linter.tar - name: Run mypy - run: docker run base:latest mypy . + run: docker run linter:latest mypy . tests: runs-on: ubuntu-latest - needs: build_base + needs: build_test env: TAG: tests:latest steps: From 67b34e799f76ac42039071ce36b2da82ffbe7605 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Fri, 19 Dec 2025 17:40:20 +0300 Subject: [PATCH 12/16] rename --- .github/workflows/checks.yml | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 87e252103..ad640edf9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -45,29 +45,6 @@ jobs: - name: Run ruff check run: docker run linter:latest ruff check --output-format=github . - build_test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build tests image - uses: docker/build-push-action@v6 - with: - context: . - file: .docker/test.Dockerfile - target: runtime - cache-from: type=gha - cache-to: type=gha,mode=max - outputs: type=docker,dest=/tmp/tests.tar - tags: tests:latest - - name: Upload tests image - uses: actions/upload-artifact@v4 - with: - name: tests-image - path: /tmp/tests.tar - retention-days: 1 - ruff_format: runs-on: ubuntu-latest needs: build_linter @@ -96,6 +73,29 @@ jobs: - name: Run mypy run: docker run linter:latest mypy . + build_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build tests image + uses: docker/build-push-action@v6 + with: + context: . + file: .docker/test.Dockerfile + target: runtime + cache-from: type=gha + cache-to: type=gha,mode=max + outputs: type=docker,dest=/tmp/tests.tar + tags: tests:latest + - name: Upload tests image + uses: actions/upload-artifact@v4 + with: + name: tests-image + path: /tmp/tests.tar + retention-days: 1 + tests: runs-on: ubuntu-latest needs: build_test From 134c65eb161451cf1b8ef41fcf1042cc4045f4db Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Mon, 22 Dec 2025 11:39:40 +0300 Subject: [PATCH 13/16] refactor: name --- .github/workflows/checks.yml | 62 ++++++++++++++++++------------------ interface | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ad640edf9..ad522943c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -4,14 +4,12 @@ on: branches: [main] pull_request: null -env: - REPO: ${{ github.repository }} - jobs: - build_linter: + build_linter_image: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build linter image @@ -22,18 +20,18 @@ jobs: target: runtime cache-from: type=gha cache-to: type=gha,mode=max - outputs: type=docker,dest=/tmp/linter.tar + outputs: type=docker,dest=/tmp/linter_image.tar tags: linter:latest - name: Upload linter image uses: actions/upload-artifact@v4 with: name: linter-image - path: /tmp/linter.tar + path: /tmp/linter_image.tar retention-days: 1 - ruff_linter: + run_ruff_check: runs-on: ubuntu-latest - needs: build_linter + needs: build_linter_image steps: - name: Download linter image uses: actions/download-artifact@v4 @@ -41,13 +39,13 @@ jobs: name: linter-image path: /tmp - name: Load image - run: docker load -i /tmp/linter.tar + run: docker load -i /tmp/linter_image.tar - name: Run ruff check run: docker run linter:latest ruff check --output-format=github . - ruff_format: + run_ruff_format: runs-on: ubuntu-latest - needs: build_linter + needs: build_linter_image steps: - name: Download linter image uses: actions/download-artifact@v4 @@ -55,13 +53,13 @@ jobs: name: linter-image path: /tmp - name: Load image - run: docker load -i /tmp/linter.tar + run: docker load -i /tmp/linter_image.tar - name: Run ruff format run: docker run linter:latest ruff format --check - mypy: + run_mypy: runs-on: ubuntu-latest - needs: build_linter + needs: build_linter_image steps: - name: Download linter image uses: actions/download-artifact@v4 @@ -69,17 +67,18 @@ jobs: name: linter-image path: /tmp - name: Load image - run: docker load -i /tmp/linter.tar + run: docker load -i /tmp/linter_image.tar - name: Run mypy run: docker run linter:latest mypy . - build_test: + build_test_image: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build tests image + - name: Build test image uses: docker/build-push-action@v6 with: context: . @@ -87,28 +86,29 @@ jobs: target: runtime cache-from: type=gha cache-to: type=gha,mode=max - outputs: type=docker,dest=/tmp/tests.tar - tags: tests:latest - - name: Upload tests image + outputs: type=docker,dest=/tmp/test_image.tar + tags: test:latest + - name: Upload test image uses: actions/upload-artifact@v4 with: - name: tests-image - path: /tmp/tests.tar + name: test-image + path: /tmp/test_image.tar retention-days: 1 - tests: + run_tests: runs-on: ubuntu-latest - needs: build_test + needs: build_test_image env: - TAG: tests:latest + TAG: test:latest # Injected into docker-compose.remote.test.yml as ${TAG} steps: - - uses: actions/checkout@v4 - - name: Download tests image + - name: Checkout code + uses: actions/checkout@v4 + - name: Download test image uses: actions/download-artifact@v4 with: - name: tests-image + name: test-image path: /tmp - name: Load image - run: docker load -i /tmp/tests.tar + run: docker load -i /tmp/test_image.tar - name: Run tests run: docker compose -f docker-compose.remote.test.yml up --no-log-prefix --attach md-test --exit-code-from md-test diff --git a/interface b/interface index 094bf0367..f31962020 160000 --- a/interface +++ b/interface @@ -1 +1 @@ -Subproject commit 094bf0367c26c574310e43714a1adfcf61ca57a1 +Subproject commit f31962020a6689e6a4c61fb3349db5b5c7895f92 From 09ccc1392a220bbb1de20cb1a4a255269fb0289a Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Mon, 22 Dec 2025 11:45:04 +0300 Subject: [PATCH 14/16] fix: cache scope --- .github/workflows/checks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ad522943c..7b347b266 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -18,8 +18,8 @@ jobs: context: . file: .docker/lint.Dockerfile target: runtime - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=${{ github.ref_name }} + cache-to: type=gha,mode=max,scope=${{ github.ref_name }} outputs: type=docker,dest=/tmp/linter_image.tar tags: linter:latest - name: Upload linter image @@ -84,8 +84,8 @@ jobs: context: . file: .docker/test.Dockerfile target: runtime - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=${{ github.ref_name }} + cache-to: type=gha,mode=max,scope=${{ github.ref_name }} outputs: type=docker,dest=/tmp/test_image.tar tags: test:latest - name: Upload test image From d37aa6425cf166ee58c7f3a4a06ac5e25c1848c3 Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Mon, 22 Dec 2025 11:54:27 +0300 Subject: [PATCH 15/16] refactor: coverage ignore couldnt-parse --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 45573c966..66af5158f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,6 +89,7 @@ cache_dir ="/app/.pytest_cache" [tool.coverage.report] show_missing = true +disable_warnings = ["couldnt-parse"] [tool.coverage.run] concurrency = ["thread", "gevent"] From f6492a5db468da628bb55bb14a62c0bc49840c5d Mon Sep 17 00:00:00 2001 From: Milov Dmitriy Date: Tue, 23 Dec 2025 15:23:26 +0300 Subject: [PATCH 16/16] fix --- interface | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/interface b/interface index f31962020..017b7f344 160000 --- a/interface +++ b/interface @@ -1 +1 @@ -Subproject commit f31962020a6689e6a4c61fb3349db5b5c7895f92 +Subproject commit 017b7f344e290814e3af5ca0f210a592afaf08ed diff --git a/pyproject.toml b/pyproject.toml index 66af5158f..45573c966 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,6 @@ cache_dir ="/app/.pytest_cache" [tool.coverage.report] show_missing = true -disable_warnings = ["couldnt-parse"] [tool.coverage.run] concurrency = ["thread", "gevent"]