File tree Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -129,10 +129,46 @@ jobs:
129
129
uses : codecov/codecov-action@v1
130
130
if : always()
131
131
132
+ test-rosetta :
133
+ runs-on : ubuntu-latest
134
+ steps :
135
+ - uses : actions/checkout@v2
136
+
137
+ - name : Use Node.js
138
+ uses : actions/setup-node@v1
139
+ with :
140
+ node-version : ' 13.x'
141
+
142
+ - name : Install deps
143
+ run : npm install
144
+
145
+ - name : Setup integration environment
146
+ run : |
147
+ sudo ufw disable
148
+ echo "::set-env name=STACKS_CORE_EVENT_HOST::http://0.0.0.0"
149
+ npm run devenv:deploy -- -d
150
+ npm run devenv:logs -- --no-color &> docker-compose-logs.txt &
151
+
152
+ - name : Run tests
153
+ run : npm run test:rosetta
154
+
155
+ - name : Print integration environment logs
156
+ run : cat docker-compose-logs.txt
157
+ if : failure()
158
+
159
+ - name : Teardown integration environment
160
+ run : npm run devenv:stop
161
+ if : always()
162
+
163
+ - name : Upload coverage to Codecov
164
+ uses : codecov/codecov-action@v1
165
+ if : always()
166
+
132
167
build-publish :
133
168
runs-on : ubuntu-latest
134
169
needs :
135
170
- test
171
+ - test-rosetta
136
172
- lint
137
173
- lint-docs
138
174
steps :
@@ -189,6 +225,7 @@ jobs:
189
225
- lint
190
226
- lint-docs
191
227
- test
228
+ - test-rosetta
192
229
- build-publish
193
230
# Only run on non-PR events or only PRs that aren't from forks
194
231
if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
Original file line number Diff line number Diff line change 11
11
"test:rosetta" : " cross-env NODE_ENV=development jest --config ./jest.config.rosetta.js --coverage --runInBand" ,
12
12
"test:watch" : " cross-env NODE_ENV=development jest --config ./jest.config.js --watch" ,
13
13
"test:integration" : " npm run devenv:deploy -- -d && cross-env NODE_ENV=development jest --config ./jest.config.js --coverage --no-cache --runInBand; npm run devenv:stop" ,
14
+ "test:integration:rosetta" : " npm run devenv:deploy -- -d && cross-env NODE_ENV=development jest --config ./jest.config.rosetta.js --coverage --no-cache --runInBand; npm run devenv:stop" ,
14
15
"build" : " rimraf ./lib && tsc" ,
15
16
"start" : " node ./lib/index.js" ,
16
17
"lint" : " npm run lint:eslint && npm run lint:prettier" ,
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ FROM debian:stretch
14
14
COPY wait-for-it.sh /bin/wait-for-it.sh
15
15
RUN chmod +x /bin/wait-for-it.sh
16
16
17
+ COPY docker-entrypoint.sh /bin/
18
+ RUN chmod +x /bin/docker-entrypoint.sh
19
+
17
20
COPY --from=build /bin/stacks-node /bin/
18
21
22
+ ENTRYPOINT ["/bin/docker-entrypoint.sh" ]
19
23
CMD ["stacks-node" ]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Use this script to enable host.docker.internal on Docker for linux.
3
+ # See https://github.com/bufferings/docker-access-host
4
+
5
+ HOST_DOMAIN=" host.docker.internal"
6
+ ping -q -c1 $HOST_DOMAIN > /dev/null 2>&1
7
+ if [ $? -ne 0 ]; then
8
+ HOST_IP=$( ip route | awk ' NR==1 {print $3}' )
9
+ echo -e " $HOST_IP \t$HOST_DOMAIN " >> /etc/hosts
10
+ fi
11
+
12
+ cat /etc/hosts
13
+ echo " patched host.docker.internal"
14
+
15
+ exec " $@ "
You can’t perform that action at this time.
0 commit comments