Adds CI config (#54)
* add travis config * yml -> yaml * change to before install * move to docker based test * add debug info to test * add debug info for realz * add install for sample * add lib directory
This commit is contained in:
Родитель
6879bac9ce
Коммит
1cae0bb7f0
|
@ -2,6 +2,8 @@ coverage/
|
|||
node_modules/
|
||||
npm-debug.log
|
||||
|
||||
lib
|
||||
/lib/*
|
||||
|
||||
!test/e2e/sample/lib/*
|
||||
|
||||
**/*.csv
|
|
@ -0,0 +1,10 @@
|
|||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
- docker build -t funcpack-test-suite .
|
||||
|
||||
script:
|
||||
- docker run -e "DEBUG=azure-functions-pack:*" funcpack-test-suite:latest
|
|
@ -0,0 +1,26 @@
|
|||
FROM microsoft/aspnetcore
|
||||
ENV HOME /home
|
||||
ENV FUNCPACK_TESTS_V2 1
|
||||
RUN apt-get update \
|
||||
&& apt-get install -my wget gnupg \
|
||||
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
|
||||
&& apt-get install -y nodejs openssh-server
|
||||
|
||||
COPY sshd_config /etc/ssh
|
||||
|
||||
RUN mkdir -p /home/.azurefunctions/bin
|
||||
|
||||
RUN npm i -g azure-functions-core-tools@core --unsafe-perm
|
||||
RUN mv /home/.azurefunctions/bin/workers/node /home/.azurefunctions/bin/workers/Node
|
||||
|
||||
WORKDIR /content
|
||||
|
||||
COPY . ./
|
||||
RUN npm i
|
||||
|
||||
WORKDIR /content/test/e2e/sample
|
||||
RUN npm i
|
||||
|
||||
WORKDIR /content
|
||||
|
||||
CMD ["npm", "run", "test"]
|
|
@ -0,0 +1,15 @@
|
|||
# This is ssh server systemwide configuration file.
|
||||
#
|
||||
# /etc/sshd_config
|
||||
|
||||
Port 2222
|
||||
ListenAddress 0.0.0.0
|
||||
LoginGraceTime 180
|
||||
X11Forwarding yes
|
||||
Ciphers aes128-cbc,3des-cbc,aes256-cbc
|
||||
MACs hmac-sha1,hmac-sha1-96
|
||||
StrictModes yes
|
||||
SyslogFacility DAEMON
|
||||
PasswordAuthentication yes
|
||||
PermitEmptyPasswords no
|
||||
PermitRootLogin yes
|
|
@ -0,0 +1,9 @@
|
|||
module.exports = function (context, req) {
|
||||
context.log('"./lib/externalScriptFile" function called');
|
||||
const res = {
|
||||
body: {
|
||||
"success":true
|
||||
}
|
||||
}
|
||||
context.done(null, res);
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
let sql = require('tedious');
|
||||
|
||||
class Model {
|
||||
getAll() {
|
||||
const request = new sql.Request("select 'hello'", function(err, rowCount) {
|
||||
// no op
|
||||
});
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
add() {
|
||||
return Promise.resolve({});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
Model: Model
|
||||
}
|
Загрузка…
Ссылка в новой задаче