Skip to content

Commit 35849bb

Browse files
committed
Merge branch 'main' into pre-creation-hook
* main: Add toxiproxy example (#643) Add spanner example (#642) chore: sync governance files (#641) Add pubsub example (#640) chore: adjust generator for the docs site (#639) Add datastore example (#638) Add firestore example (#637) fix: avoid panics when checking container state and container.raw is nil (#635) feat: provide a tool to generate examples from code (#618) chore: bump version in mkdocs (#630) docs: remove code snippets from main README (#631) docs: document replace directive for Docker Compose (#632)
2 parents 0a09cf6 + c45303b commit 35849bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+15131
-582
lines changed

.github/settings.yml

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ collaborators:
135135
permission: maintain
136136
- username: mdelapenya
137137
permission: admin
138+
- username: testcontainersbot
139+
permission: write
138140

139141
# Note: `permission` is only valid on organization-owned repositories.
140142
# The permission to grant the collaborator. Can be one of:

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: go mod verify
2525

2626
- name: modTidy
27-
run: go mod tidy
27+
run: make tools-tidy
2828

2929
- name: ensure compilation
3030
env:
@@ -43,6 +43,10 @@ jobs:
4343
if: ${{ matrix.platform == 'ubuntu-latest' }}
4444
run: make -C e2e tools-tidy
4545

46+
- name: Run example generator tests
47+
if: ${{ matrix.platform == 'ubuntu-latest' }}
48+
run: make -C examples test-unit
49+
4650
- name: Run e2e tests
4751
if: ${{ matrix.platform == 'ubuntu-latest' }}
4852
run: make test-e2e
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Cockroachdb example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-cockroachdb:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/cockroachdb
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/cockroachdb
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/cockroachdb
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-cockroachdb*.xml"
42+
if: always()
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Datastore example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-datastore:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/datastore
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/datastore
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/datastore
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-datastore*.xml"
42+
if: always()
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Firestore example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-firestore:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/firestore
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/firestore
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/firestore
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-firestore*.xml"
42+
if: always()

.github/workflows/nginx-example.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Nginx example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-nginx:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/nginx
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/nginx
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/nginx
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-nginx*.xml"
42+
if: always()

.github/workflows/pubsub-example.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Pubsub example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-pubsub:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/pubsub
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/pubsub
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/pubsub
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-pubsub*.xml"
42+
if: always()

.github/workflows/pulsar-example.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Pulsar example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-pulsar:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/pulsar
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/pulsar
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/pulsar
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-pulsar*.xml"
42+
if: always()

.github/workflows/redis-example.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Redis example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-redis:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/redis
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/redis
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/redis
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-redis*.xml"
42+
if: always()

.github/workflows/spanner-example.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Spanner example pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-spanner:
7+
strategy:
8+
matrix:
9+
go-version: [1.18.x, 1.x]
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v3
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
id: go
18+
19+
- name: Check out code into the Go module directory
20+
uses: actions/checkout@v3
21+
22+
- name: modVerify
23+
working-directory: ./examples/spanner
24+
run: go mod verify
25+
26+
- name: modTidy
27+
working-directory: ./examples/spanner
28+
run: make tools-tidy
29+
30+
- name: gotestsum
31+
working-directory: ./examples/spanner
32+
run: make test-unit
33+
34+
- name: Run checker
35+
run: |
36+
./scripts/check_environment.sh
37+
38+
- name: Test Summary
39+
uses: test-summary/action@4ee9ece4bca777a38f05c8fc578ac2007fe266f7
40+
with:
41+
paths: "**/TEST-spanner*.xml"
42+
if: always()

0 commit comments

Comments
 (0)