|
name: Tests against recent Docker engine releases |
|
|
|
on: |
|
workflow_dispatch: |
|
inputs: |
|
version: |
|
description: 'Docker version' |
|
required: false |
|
default: 'latest' |
|
type: string |
|
schedule: |
|
# nightly build, at 23:59 CEST |
|
- cron: '59 23 * * *' |
|
|
|
env: |
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} |
|
|
|
jobs: |
|
test_docker: |
|
strategy: |
|
matrix: |
|
include: |
|
- { install-docker-type: "STABLE", version: "${{ inputs.version }}", channel: stable, rootless: false } |
|
- { install-docker-type: "ROOTLESS", version: "${{ inputs.version }}", channel: stable, rootless: true } |
|
- { install-docker-type: "ROOTFUL", version: edge, channel: test, rootless: false } |
|
name: "Core tests using Docker ${{ matrix.install-docker-type }} (channel ${{ matrix.channel }})" |
|
runs-on: ubuntu-22.04 |
|
continue-on-error: true |
|
steps: |
|
- uses: actions/checkout@v6 |
|
- uses: ./.github/actions/setup-build |
|
|
|
- name: Install Stable Docker |
|
id: setup_docker |
|
uses: docker/setup-docker-action@v5 |
|
with: |
|
version: ${{ matrix.version }} |
|
channel: ${{ matrix.channel }} |
|
rootless: ${{ matrix.rootless }} |
|
|
|
- name: Check Docker version |
|
run: docker version |
|
|
|
- name: Build with Gradle |
|
run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_${{ matrix.install-docker-type }} testcontainers:test -Dorg.gradle.caching=false |
|
env: |
|
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}} |
|
- uses: ./.github/actions/setup-junit-report |
|
|
|
- name: Notify to Slack on failures |
|
if: failure() |
|
id: slack |
|
uses: slackapi/slack-github-action@v3.0.1 |
|
with: |
|
payload: | |
|
{ |
|
"tc_project": "testcontainers-java", |
|
"tc_docker_install_type": "${{ matrix.install-docker-type }}", |
|
"tc_github_action_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}", |
|
"tc_github_action_status": "FAILED", |
|
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}" |
|
} |
|
env: |
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCKER_LATEST_WEBHOOK }} |