Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
4e5935e4
Commit
4e5935e4
authored
8 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
time each ci step [ci drivers] [ci e2e] [ci compare_screenshots]
parent
cb026706
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/ci
+35
-15
35 additions, 15 deletions
bin/ci
bin/compare-screenshots
+1
-1
1 addition, 1 deletion
bin/compare-screenshots
with
36 additions
and
16 deletions
bin/ci
+
35
−
15
View file @
4e5935e4
...
...
@@ -41,6 +41,25 @@ is_engine_enabled() {
[[
"
$ENGINES
"
==
*
"
$1
"
*
]]
}
# print a summary on exit
results
=
""
summary
()
{
echo
-e
"========================================"
echo
-en
"
$results
"
echo
-e
"========================================"
}
trap
summary EXIT
# records the time and exit code of each step
run_step
()
{
status
=
0
start
=
$(
date
+%s
)
"
$@
"
||
status
=
$?
elapsed
=
$(
expr
$(
date
+%s
)
-
$start
||
true
)
results
=
"
${
results
}
status=
$status
time=
$elapsed
command=
$@
\n
"
return
$status
}
# default engines
export
ENGINES
=
"h2"
...
...
@@ -49,44 +68,45 @@ case $CIRCLE_NODE_INDEX in
export
ENGINES
=
"h2,mongo,mysql,bigquery"
;
fi
if
is_engine_enabled
"mongo"
;
then
install-mongodb
;
run_step
install-mongodb
;
fi
lein
test
run_step
lein
test
;;
1
)
if
is_enabled
"drivers"
;
then
export
ENGINES
=
"h2,sqlserver,oracle"
;
fi
MB_DB_TYPE
=
postgres
MB_DB_DBNAME
=
circle_test
MB_DB_PORT
=
5432
MB_DB_USER
=
ubuntu
MB_DB_HOST
=
localhost
\
lein
test
run_step
lein
test
;;
2
)
if
is_enabled
"drivers"
;
then
export
ENGINES
=
"h2,postgres,sqlite,crate"
;
fi
if
is_engine_enabled
"crate"
;
then
install-crate
;
run_step
install-crate
;
fi
MB_DB_TYPE
=
mysql
MB_DB_DBNAME
=
circle_test
MB_DB_PORT
=
3306
MB_DB_USER
=
ubuntu
MB_DB_HOST
=
localhost
\
lein
test
run_step
lein
test
;;
3
)
if
is_enabled
"drivers"
;
then
export
ENGINES
=
"h2,redshift,druid"
;
fi
lein
test
run_step
lein
test
;;
4
)
lein eastwood
lein bikeshed
lein docstring-checker
./bin/reflection-linter
4
)
run_step
lein eastwood
run_step
lein bikeshed
run_step
lein docstring-checker
run_step
./bin/reflection-linter
;;
5
)
npm run lint
npm run
test
5
)
run_step
npm run lint
run_step
npm run
test
;;
6
)
./bin/build version frontend sample-dataset uberjar
6
)
run_step
./bin/build version frontend sample-dataset uberjar
if
is_enabled
"e2e"
||
is_enabled
"compare_screenshots"
;
then
USE_SAUCE
=
true
npm run test-e2e
USE_SAUCE
=
true
\
run_step npm run test-e2e
fi
if
is_enabled
"compare_screenshots"
;
then
node_modules/.bin/babel-node ./bin/compare-screenshots
run_step
node_modules/.bin/babel-node ./bin/compare-screenshots
fi
;;
esac
This diff is collapsed.
Click to expand it.
bin/compare-screenshots
+
1
−
1
View file @
4e5935e4
...
...
@@ -14,7 +14,7 @@ const SLACK_TOKEN = process.env["SLACK_TOKEN"];
const
SLACK_CHANNEL
=
"#ci-screenshots"
;
const
CIRCLE_PROJECT
=
"github/metabase/metabase"
;
const
CIRCLE_BRANCH
=
"
new-e2e-test-setup
"
;
const
CIRCLE_BRANCH
=
"
master
"
;
const
CIRCLE_SCREENSHOT_PATH
=
"/home/ubuntu/metabase/screenshots/"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment