Skip to content
This repository was archived by the owner on Oct 30, 2020. It is now read-only.

Commit 89a4143

Browse files
author
Paulo Baima
committed
adding unit tests configuration
1 parent b30d279 commit 89a4143

23 files changed

+2650
-1170
lines changed

.devcontainer/Dockerfile

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
#-------------------------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4-
#-------------------------------------------------------------------------------------------------------------
5-
6-
FROM node:8
7-
8-
# Avoid warnings by switching to noninteractive
9-
ENV DEBIAN_FRONTEND=noninteractive
10-
11-
# The node image comes with a base non-root 'node' user which this Dockerfile
12-
# gives sudo access. However, for Linux, this user's GID/UID must match your local
13-
# user UID/GID to avoid permission issues with bind mounts. Update USER_UID / USER_GID
14-
# if yours is not 1000. See https://aka.ms/vscode-remote/containers/non-root-user.
15-
ARG USER_UID=1000
16-
ARG USER_GID=$USER_UID
17-
18-
# Configure apt and install packages
19-
RUN apt-get update \
20-
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
21-
#
22-
# Verify git and needed tools are installed
23-
&& apt-get -y install git iproute2 procps \
24-
#
25-
# Remove outdated yarn from /opt and install via package
26-
# so it can be easily updated via apt-get upgrade yarn
27-
&& rm -rf /opt/yarn-* \
28-
&& rm -f /usr/local/bin/yarn \
29-
&& rm -f /usr/local/bin/yarnpkg \
30-
&& apt-get install -y curl apt-transport-https lsb-release \
31-
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
32-
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
33-
&& apt-get update \
34-
&& apt-get -y install --no-install-recommends yarn \
35-
#
36-
# Install tslint and typescript globally
37-
&& npm install -g tslint typescript \
38-
#
39-
# [Optional] Update a non-root user to match UID/GID - see https://aka.ms/vscode-remote/containers/non-root-user.
40-
&& if [ "$USER_GID" != "1000" ]; then groupmod node --gid $USER_GID; fi \
41-
&& if [ "$USER_UID" != "1000" ]; then usermod --uid $USER_UID node; fi \
42-
# [Optional] Add add sudo support for non-root user
43-
&& apt-get install -y sudo \
44-
&& echo node ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/node \
45-
&& chmod 0440 /etc/sudoers.d/node \
46-
#
47-
# Clean up
48-
&& apt-get autoremove -y \
49-
&& apt-get clean -y \
50-
&& rm -rf /var/lib/apt/lists/*
51-
52-
# Switch back to dialog for any ad-hoc use of apt-get
53-
ENV DEBIAN_FRONTEND=
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
FROM node:8
7+
8+
# Avoid warnings by switching to noninteractive
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
11+
# The node image comes with a base non-root 'node' user which this Dockerfile
12+
# gives sudo access. However, for Linux, this user's GID/UID must match your local
13+
# user UID/GID to avoid permission issues with bind mounts. Update USER_UID / USER_GID
14+
# if yours is not 1000. See https://aka.ms/vscode-remote/containers/non-root-user.
15+
ARG USER_UID=1000
16+
ARG USER_GID=$USER_UID
17+
18+
# Configure apt and install packages
19+
RUN apt-get update \
20+
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
21+
#
22+
# Verify git and needed tools are installed
23+
&& apt-get -y install git iproute2 procps \
24+
#
25+
# Remove outdated yarn from /opt and install via package
26+
# so it can be easily updated via apt-get upgrade yarn
27+
&& rm -rf /opt/yarn-* \
28+
&& rm -f /usr/local/bin/yarn \
29+
&& rm -f /usr/local/bin/yarnpkg \
30+
&& apt-get install -y curl apt-transport-https lsb-release \
31+
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
32+
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
33+
&& apt-get update \
34+
&& apt-get -y install --no-install-recommends yarn \
35+
#
36+
# Install tslint and typescript globally
37+
&& npm install -g tslint typescript \
38+
#
39+
# [Optional] Update a non-root user to match UID/GID - see https://aka.ms/vscode-remote/containers/non-root-user.
40+
&& if [ "$USER_GID" != "1000" ]; then groupmod node --gid $USER_GID; fi \
41+
&& if [ "$USER_UID" != "1000" ]; then usermod --uid $USER_UID node; fi \
42+
# [Optional] Add add sudo support for non-root user
43+
&& apt-get install -y sudo \
44+
&& echo node ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/node \
45+
&& chmod 0440 /etc/sudoers.d/node \
46+
#
47+
# Clean up
48+
&& apt-get autoremove -y \
49+
&& apt-get clean -y \
50+
&& rm -rf /var/lib/apt/lists/*
51+
52+
# Switch back to dialog for any ad-hoc use of apt-get
53+
ENV DEBIAN_FRONTEND=

.devcontainer/devcontainer.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
2-
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/typescript-node-8
3-
{
4-
"name": "Node.js 8 & TypeScript",
5-
"dockerFile": "Dockerfile",
6-
7-
// Use 'settings' to set *default* container specific settings.json values on container create.
8-
// You can edit these settings after create using File > Preferences > Settings > Remote.
9-
"settings": {
10-
"terminal.integrated.shell.linux": "/bin/bash"
11-
},
12-
13-
// Uncomment the next line if you want to publish any ports.
14-
// "appPort": [],
15-
16-
// Uncomment the next line to run commands after the container is created.
17-
// "postCreateCommand": "yarn install",
18-
19-
// Uncomment the next line to use a non-root user. On Linux, this will prevent
20-
// new files getting created as root, but you may need to update the USER_UID
21-
// and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
22-
// "runArgs": [ "-u", "node" ],
23-
24-
// Add the IDs of extensions you want installed when the container is created in the array below.
25-
"extensions": [
26-
"ms-vscode.vscode-typescript-tslint-plugin"
27-
]
1+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
2+
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/typescript-node-8
3+
{
4+
"name": "Node.js 8 & TypeScript",
5+
"dockerFile": "Dockerfile",
6+
7+
// Use 'settings' to set *default* container specific settings.json values on container create.
8+
// You can edit these settings after create using File > Preferences > Settings > Remote.
9+
"settings": {
10+
"terminal.integrated.shell.linux": "/bin/bash"
11+
},
12+
13+
// Uncomment the next line if you want to publish any ports.
14+
// "appPort": [],
15+
16+
// Uncomment the next line to run commands after the container is created.
17+
// "postCreateCommand": "yarn install",
18+
19+
// Uncomment the next line to use a non-root user. On Linux, this will prevent
20+
// new files getting created as root, but you may need to update the USER_UID
21+
// and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
22+
// "runArgs": [ "-u", "node" ],
23+
24+
// Add the IDs of extensions you want installed when the container is created in the array below.
25+
"extensions": [
26+
"ms-vscode.vscode-typescript-tslint-plugin"
27+
]
2828
}

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
node_modules
2-
.env
3-
*.vsix
4-
/bin
1+
node_modules
2+
.env
3+
*.vsix
4+
/bin

.vscode/launch.json

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
1-
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
8-
{
9-
"type": "node",
10-
"request": "launch",
11-
"name": "Debug unify-release-build-task",
12-
"cwd":"${workspaceFolder}/unify-release-build-task",
13-
"runtimeExecutable": "npm",
14-
"runtimeArgs": [
15-
"run-script",
16-
"debug"
17-
],
18-
"port": 9229,
19-
"outFiles": ["${workspaceRoot}/unify-release-build-task/bin"],
20-
"sourceMaps": true
21-
}
22-
]
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
{
9+
"type": "node",
10+
"request": "launch",
11+
"name": "Debug unify-release-build-task",
12+
"cwd":"${workspaceFolder}/unify-release-build-task",
13+
"runtimeExecutable": "npm",
14+
"runtimeArgs": [
15+
"run-script",
16+
"debug"
17+
],
18+
"port": 9229,
19+
"outFiles": ["${workspaceRoot}/unify-release-build-task/bin"],
20+
"sourceMaps": true,
21+
"timeout": 30000
22+
},
23+
{
24+
"type": "node",
25+
"request": "launch",
26+
"name": "Test unify-release-build-task",
27+
"cwd":"${workspaceFolder}/unify-release-build-task",
28+
"runtimeExecutable": "npm",
29+
"runtimeArgs": [
30+
"run-script",
31+
"test-debug"
32+
],
33+
"port": 9229,
34+
"outFiles": ["${workspaceRoot}/unify-release-build-task/bin"],
35+
"sourceMaps": true
36+
}
37+
]
2338
}

unify-release-build-task/.taskkey

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6b4d1285-c5c0-4c36-a989-0dcef5245037
1+
1bd0c389-dabe-4430-a0d7-49c876a387a1

unify-release-build-task/bin/azureDevOpsClient.js

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)