forked from testcontainers/testcontainers-go
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.46 KB
/
docker-moby-latest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Tests against Latest Docker Moby
on:
schedule:
# nightly build, at 23:59 CEST
- cron: '59 23 * * *'
jobs:
test_latest_moby:
strategy:
matrix:
rootless-docker: [true, false]
containerd-integration: [true, false]
name: "Core tests using latest moby/moby"
runs-on: 'ubuntu-latest'
continue-on-error: true
steps:
- name: Set the Docker Install type
run: |
echo "docker_install_type=${{ matrix.rootless-docker == true && 'Rootless' || 'Rootful' }}" >> "$GITHUB_ENV"
echo "containerd_integration=${{ matrix.containerd-integration == true && 'containerd' || '' }}" >> "$GITHUB_ENV"
- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
id: go
- name: modVerify
run: go mod verify
- name: modTidy
run: go mod tidy
- name: Install Nightly Docker
uses: crazy-max/ghaction-setup-docker@master
with:
rootless: ${{ matrix.rootless-docker }}
version: type=image,tag=master
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": ${{ matrix.containerd-integration }}
}
}
- name: go test
timeout-minutes: 30
run: make test-unit
- name: Create slack payload file
if: failure()
run: |
cat <<EOF > ./payload-slack-content.json
{
"tc_project": "testcontainers-go",
"tc_docker_install_type": "${docker_install_type}",
"tc_containerd_integration": "${containerd_integration}",
"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 }}"
}
- name: Notify to Slack on failures
if: failure()
id: slack
uses: slackapi/[email protected]
with:
payload-file-path: "./payload-slack-content.json"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCKER_LATEST_WEBHOOK }}