From 68ffb90f34ef0a0d299791f9c9535c36ee04a01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 15 Nov 2024 18:57:04 +0000 Subject: [PATCH 1/2] feat(ci): Enable master moby with rootless (#2880) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- .github/workflows/docker-moby-latest.yml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docker-moby-latest.yml b/.github/workflows/docker-moby-latest.yml index a5902d1fe3..bebb968652 100644 --- a/.github/workflows/docker-moby-latest.yml +++ b/.github/workflows/docker-moby-latest.yml @@ -11,10 +11,6 @@ jobs: matrix: rootless-docker: [true, false] containerd-integration: [true, false] - # ghaction-setup-docker doesn't work with rootless yet - exclude: - - rootless-docker: true - containerd-integration: true name: "Core tests using latest moby/moby" runs-on: 'ubuntu-latest' @@ -25,14 +21,6 @@ jobs: echo "docker_install_type=${{ matrix.rootless-docker == true && 'Rootless' || 'Rootful' }}" >> "$GITHUB_ENV" echo "containerd_integration=${{ matrix.containerd-integration == true && 'containerd' || '' }}" >> "$GITHUB_ENV" - - name: Setup rootless Docker - if: ${{ matrix.rootless-docker }} - uses: ScribeMD/rootless-docker@6bd157a512c2fafa4e0243a8aa87d964eb890886 # v0.2.2 - - - name: Remove Docker root socket - if: ${{ matrix.rootless-docker }} - run: sudo rm -rf /var/run/docker.sock - - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 @@ -50,10 +38,10 @@ jobs: run: go mod tidy - name: Install Nightly Docker - # rootless not supported with ghaction-setup-docker yet - if: ${{ matrix.rootless-docker == false }} uses: crazy-max/ghaction-setup-docker@master with: + rootless: ${{ matrix.rootless-docker }} + version: type=image,tag=master daemon-config: | { "debug": true, @@ -61,11 +49,6 @@ jobs: "containerd-snapshotter": ${{ matrix.containerd-integration }} } } - version: type=image,tag=master - - - name: Install test Docker - if: ${{ matrix.rootless-docker }} - run: curl https://get.docker.com | CHANNEL=test sh - name: go test timeout-minutes: 30 From 90388aee299bad6d52cf252778d19b4ebfc9532f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 18 Nov 2024 11:47:36 +0100 Subject: [PATCH 2/2] fix: update GH actions for uploading/downloading artifacts (#2888) * fix: breaking change in upload/download artifact github action * fix: update version in comment * chore: name more deterministic --- .github/workflows/ci-test-go.yml | 4 ++-- .github/workflows/ci.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-test-go.yml b/.github/workflows/ci-test-go.yml index 2e6e7a85e4..ed0bcbf2d8 100644 --- a/.github/workflows/ci-test-go.yml +++ b/.github/workflows/ci-test-go.yml @@ -121,9 +121,9 @@ jobs: - name: Upload SonarCloud files if: ${{ github.ref_name == 'main' && github.repository_owner == 'testcontainers' && inputs.run-tests && !inputs.rootless-docker }} - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: - name: sonarcloud + name: sonarcloud-${{ inputs.project-directory }}-${{ inputs.go-version }}-${{ inputs.platform }} path: | ./sonar-project.properties ${{ inputs.project-directory }}/TEST-unit.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb81f57214..10fb7f4949 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,7 +136,8 @@ jobs: - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: sonarcloud + pattern: sonarcloud-* + merge-multiple: true - name: Analyze with SonarCloud uses: sonarsource/sonarcloud-github-action@49e6cd3b187936a73b8280d59ffd9da69df63ec9 # v2.1.1