Skip to content

Commit f167714

Browse files
EranSchNimaSoroush
authored andcommitted
Improve Docker developer experience (#84)
* Add dockerignore file to reduce build context size * Add script to run integration tests with volume map * Simplify npm scripts with docker one-liner * Maintian an NPM script for running integration tests locally
1 parent acad965 commit f167714

File tree

2 files changed

+146
-1
lines changed

2 files changed

+146
-1
lines changed

.dockerignore

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### macOS template
3+
# General
4+
.DS_Store
5+
.AppleDouble
6+
.LSOverride
7+
8+
# Icon must end with two \r
9+
Icon
10+
11+
# Thumbnails
12+
._*
13+
14+
# Files that might appear in the root of a volume
15+
.DocumentRevisions-V100
16+
.fseventsd
17+
.Spotlight-V100
18+
.TemporaryItems
19+
.Trashes
20+
.VolumeIcon.icns
21+
.com.apple.timemachine.donotpresent
22+
23+
# Directories potentially created on remote AFP share
24+
.AppleDB
25+
.AppleDesktop
26+
Network Trash Folder
27+
Temporary Items
28+
.apdisk
29+
### JetBrains template
30+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
31+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
32+
33+
# User-specific stuff
34+
.idea/**/workspace.xml
35+
.idea/**/tasks.xml
36+
.idea/**/dictionaries
37+
.idea/**/shelf
38+
39+
# Sensitive or high-churn files
40+
.idea/**/dataSources/
41+
.idea/**/dataSources.ids
42+
.idea/**/dataSources.local.xml
43+
.idea/**/sqlDataSources.xml
44+
.idea/**/dynamic.xml
45+
.idea/**/uiDesigner.xml
46+
.idea/**/dbnavigator.xml
47+
48+
# Gradle
49+
.idea/**/gradle.xml
50+
.idea/**/libraries
51+
52+
# CMake
53+
cmake-build-debug/
54+
cmake-build-release/
55+
56+
# Mongo Explorer plugin
57+
.idea/**/mongoSettings.xml
58+
59+
# File-based project format
60+
*.iws
61+
62+
# IntelliJ
63+
out/
64+
65+
# mpeltonen/sbt-idea plugin
66+
.idea_modules/
67+
68+
# JIRA plugin
69+
atlassian-ide-plugin.xml
70+
71+
# Cursive Clojure plugin
72+
.idea/replstate.xml
73+
74+
# Crashlytics plugin (for Android Studio and IntelliJ)
75+
com_crashlytics_export_strings.xml
76+
crashlytics.properties
77+
crashlytics-build.properties
78+
fabric.properties
79+
80+
# Editor-based Rest Client
81+
.idea/httpRequests
82+
### Node template
83+
# Logs
84+
logs
85+
*.log
86+
npm-debug.log*
87+
yarn-debug.log*
88+
yarn-error.log*
89+
90+
# Runtime data
91+
pids
92+
*.pid
93+
*.seed
94+
*.pid.lock
95+
96+
# Directory for instrumented libs generated by jscoverage/JSCover
97+
lib-cov
98+
99+
# Coverage directory used by tools like istanbul
100+
coverage
101+
102+
# nyc test coverage
103+
.nyc_output
104+
105+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
106+
.grunt
107+
108+
# Bower dependency directory (https://bower.io/)
109+
bower_components
110+
111+
# node-waf configuration
112+
.lock-wscript
113+
114+
# Compiled binary addons (https://nodejs.org/api/addons.html)
115+
build/Release
116+
117+
# Dependency directories
118+
node_modules/
119+
jspm_packages/
120+
121+
# TypeScript v1 declaration files
122+
typings/
123+
124+
# Optional npm cache directory
125+
.npm
126+
127+
# Optional eslint cache
128+
.eslintcache
129+
130+
# Optional REPL history
131+
.node_repl_history
132+
133+
# Output of 'npm pack'
134+
*.tgz
135+
136+
# Yarn Integrity file
137+
.yarn-integrity
138+
139+
# dotenv environment variables file
140+
.env
141+
142+
# next.js build output
143+
.next
144+

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build-docs": "mkdir -p docs && jsdoc2md src/*.js > docs/api.md",
1010
"pretest": "npm run lint",
1111
"test": "jest --testPathIgnorePatterns integration.test",
12-
"test:integration": "jest --testPathPattern integration.test"
12+
"jest:integration": "jest --testPathPattern integration.test",
13+
"test:integration": "docker build -t differencify . && docker run --volume \"$(pwd)/src/integration.tests\":/differencify/src/integration.tests -t differencify npm run jest:integration"
1314
},
1415
"repository": {
1516
"type": "git",

0 commit comments

Comments
 (0)