Skip to content

Commit d6be2a9

Browse files
authored
gh actions
1 parent ef18086 commit d6be2a9

File tree

5 files changed

+83
-7
lines changed

5 files changed

+83
-7
lines changed

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/typescript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version: 16, 14, 12
4+
ARG VARIANT="16-buster"
5+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
6+
7+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
8+
# && apt-get -y install --no-install-recommends xclip
9+
10+
# [Optional] Uncomment if you want to install an additional version of node using nvm
11+
# ARG EXTRA_NODE_VERSION=10
12+
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
13+
14+
# [Optional] Uncomment if you want to install more global node packages
15+
# RUN su node -c "npm install -g <your-package-list -here>"

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick a Node version: 12, 14, 16
8+
"args": {
9+
"VARIANT": "16"
10+
}
11+
},
12+
13+
// Set *default* container specific settings.json values on container create.
14+
"settings": {},
15+
16+
// Add the IDs of extensions you want installed when the container is created.
17+
"extensions": [
18+
"dbaeumer.vscode-eslint",
19+
"esbenp.prettier-vscode",
20+
"tlent.jest-snapshot-language-support",
21+
"ms-azuretools.vscode-docker"
22+
],
23+
24+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
25+
// "forwardPorts": [],
26+
27+
// Use 'postCreateCommand' to run commands after the container is created.
28+
// "postCreateCommand": "yarn install",
29+
30+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
31+
"remoteUser": "node"
32+
}
33+

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Mimer
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request_target:
7+
types: [assigned, opened, synchronize, reopened]
8+
jobs:
9+
check-package:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node: ['10', '12', '14', '16']
14+
name: Check package on Node.js ${{ matrix.node }}
15+
steps:
16+
- uses: actions/checkout@v2
17+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
18+
- uses: actions/checkout@v2
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
if: ${{ github.event_name == 'pull_request_target' }}
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: ${{ matrix.node }}
25+
- uses: actions/cache@v2
26+
with:
27+
path: ~/.npm
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-
31+
- name: Build and test
32+
run: |
33+
npm ci --prefer-offline --no-audit
34+
npm test

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
"jest": "^24.7.1",
4242
"request": "^2.88.0"
4343
}
44-
}
44+
}

0 commit comments

Comments
 (0)