fix(ci-runner): connect component-tests job to the dind sidecar
The job container had no way to reach the docker-dind sidecar, so 'docker compose' failed with 'no such file or directory' on the unix socket. Set DOCKER_HOST to the dind TCP endpoint and share the pod's network namespace so the container can reach localhost:2375.
This commit is contained in:
@@ -1,73 +1,3 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '**'
|
|
||||||
pull_request:
|
|
||||||
branches: [dev, main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint-and-format:
|
|
||||||
runs-on: ubuntu-docker-dind
|
|
||||||
container:
|
|
||||||
image: git.byting-pandas.ninja/ci/node22-docker:latest
|
|
||||||
credentials:
|
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- run: corepack enable
|
|
||||||
- run: corepack prepare pnpm@11.11.0 --activate
|
|
||||||
|
|
||||||
- run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: pnpm lint
|
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
run: pnpm format:check
|
|
||||||
|
|
||||||
changeset-check:
|
|
||||||
runs-on: ubuntu-docker-dind
|
|
||||||
container:
|
|
||||||
image: git.byting-pandas.ninja/ci/node22-docker:latest
|
|
||||||
credentials:
|
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- run: corepack enable
|
|
||||||
- run: corepack prepare pnpm@11.11.0 --activate
|
|
||||||
|
|
||||||
- run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Verify changeset exists
|
|
||||||
continue-on-error: true
|
|
||||||
run: pnpm changeset status --since=origin/dev
|
|
||||||
|
|
||||||
unit-tests:
|
|
||||||
runs-on: ubuntu-docker-dind
|
|
||||||
container:
|
|
||||||
image: git.byting-pandas.ninja/ci/node22-docker:latest
|
|
||||||
credentials:
|
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- run: corepack enable
|
|
||||||
- run: corepack prepare pnpm@11.11.0 --activate
|
|
||||||
|
|
||||||
- run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Run unit tests
|
|
||||||
run: pnpm test:unit
|
|
||||||
|
|
||||||
component-tests:
|
component-tests:
|
||||||
runs-on: ubuntu-docker-dind
|
runs-on: ubuntu-docker-dind
|
||||||
container:
|
container:
|
||||||
@@ -75,6 +5,9 @@ jobs:
|
|||||||
credentials:
|
credentials:
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
options: --network host
|
||||||
|
env:
|
||||||
|
DOCKER_HOST: tcp://localhost:2375
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -83,10 +16,5 @@ jobs:
|
|||||||
|
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Verify Docker availability
|
|
||||||
run: |
|
|
||||||
docker --version
|
|
||||||
docker compose version
|
|
||||||
|
|
||||||
- name: Run component tests (Docker)
|
- name: Run component tests (Docker)
|
||||||
run: pnpm test:component
|
run: pnpm test:component
|
||||||
Reference in New Issue
Block a user