test docker24 #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - '.github/ISSUE_TEMPLATE/*.yaml' | |
| - '.github/CODEOWNERS' | |
| - '.github/pull_request_template.md' | |
| - 'docs/**/*.css' | |
| - 'docs/**/*.html' | |
| - 'docs/**/*.ico' | |
| - 'docs/**/*.md' | |
| - 'docs/**/*.png' | |
| - 'docs/**/*.svg' | |
| - 'mkdocs.yml' | |
| - 'README.md' | |
| - 'RELEASING.md' | |
| - '.sdkmanrc' | |
| push: | |
| branches: [ ci-run ] | |
| paths-ignore: | |
| - '.github/ISSUE_TEMPLATE/*.yaml' | |
| - '.github/CODEOWNERS' | |
| - '.github/pull_request_template.md' | |
| - 'docs/**/*.css' | |
| - 'docs/**/*.html' | |
| - 'docs/**/*.ico' | |
| - 'docs/**/*.md' | |
| - 'docs/**/*.png' | |
| - 'docs/**/*.svg' | |
| - 'mkdocs.yml' | |
| - 'README.md' | |
| - 'RELEASING.md' | |
| - '.sdkmanrc' | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}" | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
| jobs: | |
| core: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| strategy: | |
| matrix: | |
| java: [ '17', '21' ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Force Docker Version 24 | |
| run: | | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| DOCKER_VERSION=$(apt-cache madison docker-ce | awk '{ print $3 }' | grep "5:24" | head -n 1) | |
| sudo apt-get install -y --allow-downgrades docker-ce="${DOCKER_VERSION}" docker-ce-cli="${DOCKER_VERSION}" containerd.io | |
| - uses: ./.github/actions/setup-build | |
| with: | |
| java-version: ${{ matrix.java }} | |
| - name: Build and test with Gradle | |
| run: | | |
| ./gradlew :testcontainers:check --no-daemon --continue --scan | |
| - uses: ./.github/actions/setup-junit-report | |
| turbo-mode: | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Force Docker Version 24 | |
| run: | | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| DOCKER_VERSION=$(apt-cache madison docker-ce | awk '{ print $3 }' | grep "5:24" | head -n 1) | |
| sudo apt-get install -y --allow-downgrades docker-ce="${DOCKER_VERSION}" docker-ce-cli="${DOCKER_VERSION}" containerd.io | |
| - uses: ./.github/actions/setup-build | |
| - name: Setup Testcontainers Cloud Client | |
| uses: atomicjar/testcontainers-cloud-setup-action@main | |
| with: | |
| token: ${{ secrets.TC_CLOUD_TOKEN }} | |
| args: --max-concurrency=4 | |
| - name: Test using Testcontainers Cloud with Turbo Mode enabled | |
| working-directory: ./smoke-test/ | |
| run: | | |
| ./gradlew check --no-daemon --continue --scan --info | |
| - uses: ./.github/actions/setup-junit-report | |
| find_gradle_jobs: | |
| needs: [core] | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Force Docker Version 24 | |
| run: | | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| DOCKER_VERSION=$(apt-cache madison docker-ce | awk '{ print $3 }' | grep "5:24" | head -n 1) | |
| sudo apt-get install -y --allow-downgrades docker-ce="${DOCKER_VERSION}" docker-ce-cli="${DOCKER_VERSION}" containerd.io | |
| - uses: ./.github/actions/setup-java | |
| - name: Setup Gradle Build Action | |
| uses: gradle/actions/setup-gradle@v5 | |
| - id: set-matrix | |
| env: | |
| # Since we override the tests executor, | |
| # we should not push empty results to the cache | |
| READ_ONLY_REMOTE_GRADLE_CACHE: true | |
| run: | | |
| TASKS=$(./gradlew --no-daemon --parallel -q testMatrix | jq 'del(.[] | select(. == ":testcontainers:check" or startswith(":docs:")))' --compact-output) | |
| echo $TASKS | |
| echo "matrix={\"gradle_args\":$TASKS}" >> $GITHUB_OUTPUT | |
| check: | |
| needs: [find_gradle_jobs] | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.find_gradle_jobs.outputs.matrix) }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/actions/setup-build | |
| - name: Build and test with Gradle (${{matrix.gradle_args}}) | |
| run: | | |
| ./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}} | |
| - uses: ./.github/actions/setup-junit-report | |
| find_examples_jobs: | |
| needs: [check] | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Force Docker Version 24 | |
| run: | | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| DOCKER_VERSION=$(apt-cache madison docker-ce | awk '{ print $3 }' | grep "5:24" | head -n 1) | |
| sudo apt-get install -y --allow-downgrades docker-ce="${DOCKER_VERSION}" docker-ce-cli="${DOCKER_VERSION}" containerd.io | |
| - uses: ./.github/actions/setup-java | |
| - name: Setup Gradle Build Action | |
| uses: gradle/actions/setup-gradle@v5 | |
| - id: set-matrix | |
| working-directory: ./examples/ | |
| env: | |
| # Since we override the tests executor, | |
| # we should not push empty results to the cache | |
| READ_ONLY_REMOTE_GRADLE_CACHE: true | |
| run: | | |
| TASKS=$(./gradlew --no-daemon --parallel -q testMatrix) | |
| echo $TASKS | |
| echo "matrix={\"gradle_args\":$TASKS}" >> $GITHUB_OUTPUT | |
| check_examples: | |
| needs: [find_examples_jobs] | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.find_examples_jobs.outputs.matrix) }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/actions/setup-build | |
| - name: Build and test Examples with Gradle (${{matrix.gradle_args}}) | |
| working-directory: ./examples/ | |
| run: | | |
| ./gradlew --no-daemon --continue --scan --info ${{matrix.gradle_args}} | |
| - uses: ./.github/actions/setup-junit-report | |
| find_docs_examples_jobs: | |
| needs: [check_examples] | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Force Docker Version 24 | |
| run: | | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| DOCKER_VERSION=$(apt-cache madison docker-ce | awk '{ print $3 }' | grep "5:24" | head -n 1) | |
| sudo apt-get install -y --allow-downgrades docker-ce="${DOCKER_VERSION}" docker-ce-cli="${DOCKER_VERSION}" containerd.io | |
| - uses: ./.github/actions/setup-java | |
| - name: Setup Gradle Build Action | |
| uses: gradle/actions/setup-gradle@v5 | |
| - id: set-matrix | |
| env: | |
| # Since we override the tests executor, | |
| # we should not push empty results to the cache | |
| READ_ONLY_REMOTE_GRADLE_CACHE: true | |
| run: | | |
| TASKS=$(./gradlew --no-daemon --parallel -q testMatrix | jq 'map(select(startswith(":docs:")))' --compact-output) | |
| echo $TASKS | |
| echo "matrix={\"gradle_args\":$TASKS}" >> $GITHUB_OUTPUT | |
| check_docs_examples: | |
| needs: [find_docs_examples_jobs] | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.find_docs_examples_jobs.outputs.matrix) }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/actions/setup-build | |
| - name: Build and test with Gradle (${{matrix.gradle_args}}) | |
| run: | | |
| ./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}} | |
| - uses: ./.github/actions/setup-junit-report |