From f0592995907bd21473f4c53517c508e79dfa8910 Mon Sep 17 00:00:00 2001 From: senke Date: Thu, 9 Apr 2026 17:39:10 +0200 Subject: [PATCH] ci: fix Forgejo runner compat (rust, rsync, docker compose) - Replace dtolnay/rust-toolchain with manual rustup (not on forgejo mirror) - Replace docker-compose with docker compose (v2) - Add rsync install before tmt Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/accessibility.yml | 8 +-- .github/workflows/chromatic.yml | 88 +++++++++++++----------- .github/workflows/ci.yml | 16 ++--- .github/workflows/flaky-report.yml | 2 +- .github/workflows/load-test-nightly.yml | 2 +- .github/workflows/rust-ci.yml | 7 +- .github/workflows/rust-mutation.yml | 5 +- .github/workflows/staging-validation.yml | 4 +- .github/workflows/stream-ci.yml | 6 +- 9 files changed, 73 insertions(+), 65 deletions(-) diff --git a/.github/workflows/accessibility.yml b/.github/workflows/accessibility.yml index fe0b2950a..2f136d06f 100644 --- a/.github/workflows/accessibility.yml +++ b/.github/workflows/accessibility.yml @@ -40,7 +40,7 @@ jobs: - name: Start backend services (Postgres, Redis, RabbitMQ) run: | - docker-compose up -d postgres redis rabbitmq + docker compose up -d postgres redis rabbitmq echo "Waiting for Postgres..." for i in $(seq 1 30); do if docker exec veza_postgres pg_isready -U veza 2>/dev/null; then @@ -49,7 +49,7 @@ jobs: fi sleep 2 done - docker-compose ps + docker compose ps - name: Run database migrations env: @@ -130,7 +130,7 @@ jobs: - name: Start backend services (Postgres, Redis, RabbitMQ) run: | - docker-compose up -d postgres redis rabbitmq + docker compose up -d postgres redis rabbitmq echo "Waiting for Postgres..." for i in $(seq 1 30); do if docker exec veza_postgres pg_isready -U veza 2>/dev/null; then @@ -139,7 +139,7 @@ jobs: fi sleep 2 done - docker-compose ps + docker compose ps - name: Run database migrations env: diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 2220dd42e..0297260b3 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -4,51 +4,55 @@ name: Chromatic on: - push: - branches: [main, develop] - paths: - - "apps/web/**" - - ".github/workflows/chromatic.yml" - pull_request: - paths: - - "apps/web/**" - - ".github/workflows/chromatic.yml" - workflow_dispatch: + push: + branches: [main, develop] + paths: + - "apps/web/**" + - ".github/workflows/chromatic.yml" + pull_request: + paths: + - "apps/web/**" + - ".github/workflows/chromatic.yml" + workflow_dispatch: + +env: + GIT_SSL_NO_VERIFY: "true" + NODE_TLS_REJECT_UNAUTHORIZED: "0" jobs: - chromatic: - name: Visual regression tests - runs-on: ubuntu-latest + chromatic: + name: Visual regression tests + runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 # Required for Chromatic to detect changes + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 # Required for Chromatic to detect changes - - name: Set up Node - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 - with: - node-version: "20" - cache: "npm" + - name: Set up Node + uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 + with: + node-version: "20" + cache: "npm" - - name: Install dependencies - run: npm ci - working-directory: apps/web + - name: Install dependencies + run: npm ci + working-directory: apps/web - - name: Run Chromatic - uses: chromaui/action@latest - with: - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - workingDir: apps/web - buildScriptName: build-storybook - exitZeroOnChanges: true # Don't fail PR on visual changes, just flag them - exitOnceUploaded: true # Speed up CI — don't wait for full processing - onlyChanged: true # Only snapshot stories affected by changes - externals: | - apps/web/src/**/*.css - apps/web/public/** - env: - VITE_API_URL: /api/v1 - VITE_USE_MSW: "true" - VITE_STORYBOOK: "true" + - name: Run Chromatic + uses: chromaui/action@latest + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + workingDir: apps/web + buildScriptName: build-storybook + exitZeroOnChanges: true # Don't fail PR on visual changes, just flag them + exitOnceUploaded: true # Speed up CI — don't wait for full processing + onlyChanged: true # Only snapshot stories affected by changes + externals: | + apps/web/src/**/*.css + apps/web/public/** + env: + VITE_API_URL: /api/v1 + VITE_USE_MSW: "true" + VITE_STORYBOOK: "true" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17234ee18..b580f616c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - name: Install TMT - run: pip install tmt + run: apt-get update && apt-get install -y rsync && pip install tmt - name: Run TMT Vital Backend run: tmt --root tmt run plan --name /vital-backend @@ -62,9 +62,9 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Rust - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable - with: - components: rustfmt, clippy + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --component rustfmt,clippy + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Cache Cargo registry uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 @@ -185,7 +185,7 @@ jobs: - name: Start backend services (Postgres, Redis, RabbitMQ) run: | - docker-compose up -d postgres redis rabbitmq + docker compose up -d postgres redis rabbitmq echo "Waiting for Postgres..." for i in $(seq 1 30); do if docker exec veza_postgres pg_isready -U veza 2>/dev/null; then @@ -194,7 +194,7 @@ jobs: fi sleep 2 done - docker-compose ps + docker compose ps - name: Run database migrations env: @@ -290,7 +290,7 @@ jobs: - name: Start backend services (Postgres, Redis, RabbitMQ) run: | - docker-compose up -d postgres redis rabbitmq + docker compose up -d postgres redis rabbitmq echo "Waiting for Postgres..." for i in $(seq 1 30); do if docker exec veza_postgres pg_isready -U veza 2>/dev/null; then @@ -299,7 +299,7 @@ jobs: fi sleep 2 done - docker-compose ps + docker compose ps - name: Run database migrations env: diff --git a/.github/workflows/flaky-report.yml b/.github/workflows/flaky-report.yml index 871e27741..cc8cf0397 100644 --- a/.github/workflows/flaky-report.yml +++ b/.github/workflows/flaky-report.yml @@ -38,7 +38,7 @@ jobs: - name: Start backend services run: | - docker-compose up -d postgres redis rabbitmq + docker compose up -d postgres redis rabbitmq for i in $(seq 1 30); do if docker exec veza_postgres pg_isready -U veza 2>/dev/null; then break; fi sleep 2 diff --git a/.github/workflows/load-test-nightly.yml b/.github/workflows/load-test-nightly.yml index e914fa401..034810ae8 100644 --- a/.github/workflows/load-test-nightly.yml +++ b/.github/workflows/load-test-nightly.yml @@ -24,7 +24,7 @@ jobs: - name: Start infrastructure run: | - docker-compose -f docker-compose.yml up -d postgres redis rabbitmq + docker compose -f docker compose.yml up -d postgres redis rabbitmq sleep 15 - name: Set up Go diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index e876ab2fb..9ea0089ca 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -18,9 +18,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable - with: - components: clippy + - name: Set up Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --component clippy + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Clippy lint run: cargo clippy -- -D warnings diff --git a/.github/workflows/rust-mutation.yml b/.github/workflows/rust-mutation.yml index fac1eb94c..195220daa 100644 --- a/.github/workflows/rust-mutation.yml +++ b/.github/workflows/rust-mutation.yml @@ -17,7 +17,10 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable + - name: Set up Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Cache cargo registry uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 diff --git a/.github/workflows/staging-validation.yml b/.github/workflows/staging-validation.yml index d2c4158cc..70bc2e514 100644 --- a/.github/workflows/staging-validation.yml +++ b/.github/workflows/staging-validation.yml @@ -51,7 +51,7 @@ jobs: docker push "${{ vars.DOCKER_REGISTRY }}/${svc}:staging" done - - name: Deploy via SSH (docker-compose) + - name: Deploy via SSH (docker compose) if: vars.STAGING_SSH_HOST != '' env: SSH_KEY: ${{ secrets.STAGING_SSH_KEY }} @@ -61,7 +61,7 @@ jobs: chmod 600 ~/.ssh/staging_key ssh -i ~/.ssh/staging_key -o StrictHostKeyChecking=no \ ${{ vars.STAGING_SSH_USER }}@${{ vars.STAGING_SSH_HOST }} \ - "cd /opt/veza && docker compose -f docker-compose.staging.yml pull && docker compose -f docker-compose.staging.yml up -d" + "cd /opt/veza && docker compose -f docker compose.staging.yml pull && docker compose -f docker compose.staging.yml up -d" rm -f ~/.ssh/staging_key - name: Deploy via Kubernetes diff --git a/.github/workflows/stream-ci.yml b/.github/workflows/stream-ci.yml index ca6345c2d..3d0ceb472 100644 --- a/.github/workflows/stream-ci.yml +++ b/.github/workflows/stream-ci.yml @@ -28,9 +28,9 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Rust - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable - with: - components: clippy + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --component clippy + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Lint with clippy run: cargo clippy --all-targets -- -D warnings