You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make DBs run on ramdisk and optimize rspec parallelism
Since in a dev scenario we dont care about data loss we can speed up the
tests majorly by running the DBs on a ramdisk.
Also since the DB consumes CPU during the test its not good to start
rspec executes equal to the number of CPU cores since the sume of load
excedes that by a lot. So we leave 20% spare for the DB to have less
CPU preemtive scheduling and all in all finish the rspecs faster.
An environment variable was introduced PARALLEL_TEST_PROCESSORS_MULTIPLE
that can be set to any floating point value and multiplies the CPU core
count times PARALLEL_TEST_PROCESSORS_MULTIPLE. It defaults to 0.8 and
rounds the CPU count up to the next integer so it cannot be less than 1
ever.
Apply DB performance optimizations also for github actions
mysql -h 127.0.0.1 -u root -psupersecret -e "CREATE DATABASE IF NOT EXISTS cc_test; CREATE DATABASE IF NOT EXISTS diego; CREATE DATABASE IF NOT EXISTS locket;"
@@ -54,9 +56,6 @@ POSTGRES_PID=$!
54
56
setupMariadb &
55
57
MARIADB_PID=$!
56
58
57
-
wait$POSTGRES_PID
58
-
wait$MARIADB_PID
59
-
60
59
# CC config
61
60
mkdir -p tmp
62
61
cp -a config/cloud_controller.yml tmp/cloud_controller.yml
@@ -120,4 +119,5 @@ yq -i e '.diego.bbs.ca_file="spec/fixtures/certs/bbs_ca.crt"' tmp/cloud_controll
120
119
121
120
yq -i e '.packages.max_package_size=2147483648' tmp/cloud_controller.yml
Copy file name to clipboardExpand all lines: .github/workflows/unit_tests_backwards_compatibility.yml
+26-3Lines changed: 26 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ concurrency:
4
4
cancel-in-progress: true
5
5
on:
6
6
workflow_dispatch:
7
-
description: "This action tests backwards compatibility when db migrations are introduced. It tests database schema at new code(old_cc_ref) with unittests running old code(new_cc_ref) "
8
7
inputs:
9
8
old_cc_ref:
10
9
description: 'Old Version of CC_NG that the backwards compatibility should be checked against'
0 commit comments