CI: Improve Docker reliability for pacman by enforcing host networking

This change updates test-cli.yml to use --network=host for docker build
and docker run steps. This significantly reduces intermittent Arch mirror
timeouts observed in local and CI environments.

Reference:
https://chatgpt.com/share/692f1bd7-f144-800f-b2ac-900d78a69e9d
This commit is contained in:
2025-12-02 18:03:36 +01:00
parent 63f6723106
commit 20ecb62afe

View File

@@ -7,7 +7,7 @@ on:
pull_request:
jobs:
build-and-test:
execute-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
@@ -17,16 +17,16 @@ jobs:
- name: Build Docker image
run: |
docker build -t infinito:latest .
docker build --network=host -t infinito:latest .
- name: Clean build artifacts
run: |
docker run --rm infinito:latest infinito make clean
docker run --network=host --rm infinito:latest infinito make clean
- name: Generate project outputs
run: |
docker run --rm infinito:latest infinito make build
docker run --network=host --rm infinito:latest infinito make build
- name: Run tests
run: |
docker run --rm infinito:latest infinito make test
docker run --network=host --rm infinito:latest infinito make test