Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: run some tests inside docker to workaround GH Actions issue #7868

Merged
merged 4 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
timeout-minutes: 30
run: |
source build.env
eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_declarative
eatmydata -- go run test.go -print-log -follow -retry=1 -shard onlineddl_declarative
2 changes: 1 addition & 1 deletion .github/workflows/cluster_endtoend_onlineddl_ghost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
timeout-minutes: 30
run: |
source build.env
eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_ghost
eatmydata -- go run test.go -print-log -follow -retry=1 -shard onlineddl_ghost
2 changes: 1 addition & 1 deletion .github/workflows/endtoend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
- name: endtoend
timeout-minutes: 30
run: |
tools/e2e_test_runner.sh
eatmydata -- go run test.go -print-log -follow -retry=1 e2e
2 changes: 1 addition & 1 deletion .github/workflows/legacy_local_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
fi
# Make sure that testing is entirely non-reliant on config
mv config config-moved
eatmydata -- test/legacy_local_example.sh
eatmydata -- go run test.go -print-log -follow -retry=1 legacy_local_example
2 changes: 1 addition & 1 deletion .github/workflows/local_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
fi
# Make sure that testing is entirely non-reliant on config
mv config config-moved
eatmydata -- test/local_example.sh
eatmydata -- go run test.go -print-log -follow -retry=1 local_example
2 changes: 1 addition & 1 deletion .github/workflows/region_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
# Make sure that testing is entirely non-reliant on config
mv config config-moved
sed -i 's/user\/my-vitess/runner\/work\/vitess\/vitess/g' examples/region_sharding/main_vschema_sharded.json #set correct path to countries.json
eatmydata -- test/region_example.sh
eatmydata -- go run test.go -print-log -follow -retry=1 region_example
2 changes: 1 addition & 1 deletion .github/workflows/unit_race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
- name: unit_race
timeout-minutes: 30
run: |
eatmydata -- make unit_test_race
eatmydata -- go run test.go -print-log -follow -retry=1 unit_race
2 changes: 1 addition & 1 deletion .github/workflows/unit_test_mariadb101.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
- name: Run test
timeout-minutes: 30
run: |
eatmydata -- make unit_test
eatmydata -- go run test.go -retry=1 -print-log -follow -flavor=mariadb101 unit
61 changes: 0 additions & 61 deletions .github/workflows/unit_test_mariadb102.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/unit_test_mariadb103.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
- name: Run test
timeout-minutes: 30
run: |
eatmydata -- make unit_test
eatmydata -- go run test.go -retry=1 -print-log -follow -flavor=mariadb103 unit
2 changes: 1 addition & 1 deletion .github/workflows/unit_test_mysql57.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
- name: Run test
timeout-minutes: 30
run: |
eatmydata -- make unit_test
eatmydata -- go run test.go -retry=1 -print-log -follow -flavor=mysql57 unit
2 changes: 1 addition & 1 deletion .github/workflows/unit_test_mysql80.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
- name: Run test
timeout-minutes: 30
run: |
eatmydata -- make unit_test
eatmydata -- go run test.go -retry=1 -print-log -follow -flavor=mysql80 unit
2 changes: 1 addition & 1 deletion .github/workflows/unit_test_percona56.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ jobs:
- name: Run test
timeout-minutes: 30
run: |
eatmydata -- make unit_test
eatmydata -- go run test.go -retry=1 -print-log -follow -flavor=percona56 unit
2 changes: 1 addition & 1 deletion examples/region_sharding/main_vschema_sharded.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"region_vdx": {
"type": "region_json",
"params": {
"region_map": "/home/user/my-vitess/examples/region_sharding/countries.json",
"region_map": "/vt/src/vitess.io/vitess/examples/region_sharding/countries.json",
"region_bytes": "1"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var (
runCount = flag.Int("runs", 1, "run each test this many times")
retryMax = flag.Int("retry", 3, "max number of retries, to detect flaky tests")
logPass = flag.Bool("log-pass", false, "log test output even if it passes")
timeout = flag.Duration("timeout", 10*time.Minute, "timeout for each test")
timeout = flag.Duration("timeout", 30*time.Minute, "timeout for each test")
pull = flag.Bool("pull", true, "re-pull the bootstrap image, in case it's been updated")
docker = flag.Bool("docker", true, "run tests with Docker")
useDockerCache = flag.Bool("use_docker_cache", false, "if true, create a temporary Docker image to cache the source code and the binaries generated by 'make build'. Used for execution on Travis CI.")
Expand Down
2 changes: 1 addition & 1 deletion test/ci_workflow_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
workflowConfigDir = "../.github/workflows"

unitTestTemplate = "templates/unit_test.tpl"
unitTestDatabases = "percona56, mysql57, mysql80, mariadb101, mariadb102, mariadb103"
unitTestDatabases = "percona56, mysql57, mysql80, mariadb101, mariadb103"

clusterTestTemplate = "templates/cluster_endtoend_test.tpl"
)
Expand Down
44 changes: 44 additions & 0 deletions test/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
"RetryMax": 0,
"Tags": []
},
"e2e": {
"File": "",
"Args": [],
"Command": [
"tools/e2e_test_runner.sh"
],
"Manual": false,
"Shard": "",
"RetryMax": 0,
"Tags": []
},
"e2e_race": {
"File": "",
"Args": [],
Expand Down Expand Up @@ -58,6 +69,39 @@
"RetryMax": 0,
"Tags": []
},
"local_example": {
"File": "",
"Args": [],
"Command": [
"test/local_example.sh"
],
"Manual": false,
"Shard": "",
"RetryMax": 0,
"Tags": []
},
"legacy_local_example": {
"File": "",
"Args": [],
"Command": [
"test/legacy_local_example.sh"
],
"Manual": false,
"Shard": "",
"RetryMax": 0,
"Tags": []
},
"region_example": {
"File": "",
"Args": [],
"Command": [
"test/region_example.sh"
],
"Manual": false,
"Shard": "",
"RetryMax": 0,
"Tags": []
},
"backup": {
"File": "unused.go",
"Args": ["vitess.io/vitess/go/test/endtoend/backup/vtctlbackup"],
Expand Down
2 changes: 1 addition & 1 deletion test/templates/unit_test.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ jobs:
- name: Run test
timeout-minutes: 30
run: |
eatmydata -- make unit_test
eatmydata -- go run test.go -retry=1 -print-log -follow -flavor={{.Platform}} unit