|
6 | 6 | - cron: '59 23 * * *' |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - test_stable_docker: |
10 | | - name: "Core tests using stable Docker-CE" |
| 9 | + test_docker: |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + install-docker-type: ["STABLE", "ROOTLESS", "ROOTFUL"] |
| 13 | + name: "Core tests using Docker ${{ matrix.install-docker-type }}" |
11 | 14 | runs-on: ubuntu-22.04 |
| 15 | + continue-on-error: true |
12 | 16 | steps: |
13 | 17 | - uses: actions/checkout@v4 |
14 | 18 | - uses: ./.github/actions/setup-build |
15 | 19 |
|
16 | 20 | - name: Install Stable Docker |
| 21 | + if: ${{ matrix.install-docker-type == "STABLE" }} |
17 | 22 | run: curl https://get.docker.com |
18 | 23 |
|
19 | | - - name: Check Docker version |
20 | | - run: docker version |
21 | | - |
22 | | - - name: Build with Gradle |
23 | | - run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_STABLE testcontainers:test -Dorg.gradle.caching=false |
24 | | - - uses: ./.github/actions/setup-junit-report |
25 | | - |
26 | | - - name: Notify to Slack on failures |
27 | | - if: failure() |
28 | | - id: slack |
29 | | - |
30 | | - with: |
31 | | - payload: | |
32 | | - { |
33 | | - "tc_project": "testcontainers-java", |
34 | | - "tc_github_action_url": "https://github.com/testcontainers/testcontainers-java/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_RUN_NUMBER }}", |
35 | | - "tc_github_action_status": "FAILED", |
36 | | - "tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}" |
37 | | - } |
38 | | - env: |
39 | | - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCKER_LATEST_WEBHOOK }} |
| 24 | + - name: Install Docker from the TEST channel |
| 25 | + if: ${{ matrix.install-docker-type == "ROOTFUL" }} |
| 26 | + run: curl https://get.docker.com | CHANNEL=test sh |
40 | 27 |
|
41 | | - test_latest_docker: |
42 | | - name: "Core tests using latest Docker-CE" |
43 | | - runs-on: ubuntu-22.04 |
44 | | - steps: |
45 | | - - uses: actions/checkout@v4 |
46 | | - - uses: ./.github/actions/setup-build |
| 28 | + - name: Setup rootless Docker |
| 29 | + if: ${{ matrix.install-docker-type == "ROOTLESS" }} |
| 30 | + uses: ScribeMD/rootless-docker@6bd157a512c2fafa4e0243a8aa87d964eb890886 # v0.2.2 |
47 | 31 |
|
48 | | - - name: Install Latest Docker |
49 | | - run: curl https://get.docker.com | CHANNEL=test sh |
| 32 | + - name: Remove Docker root socket |
| 33 | + if: ${{ matrix.install-docker-type == "ROOTLESS" }} |
| 34 | + run: sudo rm -rf /var/run/docker.sock |
50 | 35 |
|
51 | 36 | - name: Check Docker version |
52 | 37 | run: docker version |
53 | 38 |
|
54 | 39 | - name: Build with Gradle |
55 | | - run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_LATEST testcontainers:test -Dorg.gradle.caching=false |
56 | | - |
| 40 | + run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_${{ matrix.install-docker-type }} testcontainers:test -Dorg.gradle.caching=false |
57 | 41 | - uses: ./.github/actions/setup-junit-report |
58 | 42 |
|
59 | 43 | - name: Notify to Slack on failures |
|
64 | 48 | payload: | |
65 | 49 | { |
66 | 50 | "tc_project": "testcontainers-java", |
| 51 | + "tc_docker_install_type": "${{ matrix.install-docker-type }}", |
67 | 52 | "tc_github_action_url": "https://github.com/testcontainers/testcontainers-java/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_RUN_NUMBER }}", |
68 | 53 | "tc_github_action_status": "FAILED", |
69 | 54 | "tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}" |
|
0 commit comments