Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Commit 28b7c88

Browse files
authored
chore: development environment fixes, update deps, switch ci (#147)
* update dev deps * update deps * remove coverage * remove coverage * workflows + dev setup * remove old dep check options * start xvfb * xvfb * chore: allow connection via env vars * babelrc to json
1 parent 83f4565 commit 28b7c88

32 files changed

+2847
-5268
lines changed

.babelrc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"env": {
33
"production": {
4-
"presets": ["minify"]
4+
"presets": [
5+
"minify"
6+
]
57
},
68
"test": {
79
"presets": [
8-
["es2015"]
10+
[
11+
"es2015"
12+
]
913
],
1014
"plugins": [
1115
"react-hot-loader/babel",
@@ -18,7 +22,12 @@
1822
},
1923
"presets": [
2024
"react",
21-
['es2015', {'modules': false}]
25+
[
26+
"es2015",
27+
{
28+
"modules": false
29+
}
30+
]
2231
],
2332
"plugins": [
2433
"react-hot-loader/babel",

.depcheckrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
ignores: [
2+
"stores",
3+
"actions",
4+
"components",
5+
"modules",
6+
"storybook",
7+
"plugin",
8+
"babel-cli",
9+
"babel-minify",
10+
"babel-plugin-transform-decorators-legacy",
11+
"electron-packager",
12+
"eslint",
13+
"font-awesome",
14+
"inject-loader",
15+
"karma-electron",
16+
"karma-sourcemap-loader",
17+
"karma-webpack",
18+
"pre-commit",
19+
"resolve",
20+
"webpack-bundle-analyzer",
21+
"webpack-cli",
22+
"webpack-sources",
23+
"file-loader"
24+
]

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lib/**/*
2+
node_modules/**/*
3+
coverage/**/*

.eslintrc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
2-
"extends": "mongodb-js/compass-plugin",
2+
"extends": "mongodb-js/compass-plugin",
33
"rules": {
4-
"react/self-closing-comp": ["warning", {
4+
"react/self-closing-comp": ["warn", {
55
"component": true,
66
"html": true
77
}],
8-
"react/no-multi-comp": [false]
8+
"react/no-multi-comp": "off",
9+
"no-unused-vars": "error",
10+
"no-use-before-define": "off",
11+
"camelcase": "off"
912
}
1013
}

.github/workflows/run-tests.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Run Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
jobs:
9+
check-and-test:
10+
name: Check and Test
11+
runs-on: ubuntu-20.04
12+
13+
strategy:
14+
matrix:
15+
mongoVersion: [ stable ]
16+
17+
env:
18+
MONGODB_VERSION: ${{ matrix.mongoVersion }}
19+
MONGODB_TOPOLOGY: standalone
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: 12.4.0
26+
27+
- name: Cache node modules
28+
uses: actions/cache@v2
29+
env:
30+
cache-name: cache-node-modules
31+
with:
32+
path: ~/.npm
33+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
34+
restore-keys: |
35+
${{ runner.os }}-build-${{ env.cache-name }}-
36+
${{ runner.os }}-build-
37+
${{ runner.os }}-
38+
39+
- name: Install Required OS Packages
40+
run: sudo apt-get -y install libkrb5-dev libsecret-1-dev net-tools xvfb
41+
42+
- name: Install NPM Packages
43+
run: npm ci
44+
45+
- name: Check and Test
46+
run: |
47+
npm run check
48+
npm run cover
49+
while true; do \
50+
MATCH="$(sudo netstat -tlnp | grep 27018 || true)"; \
51+
if [[ "$MATCH" == "" ]]; then echo "mongod exited..."; break; fi; \
52+
echo "$MATCH"; \
53+
echo "mongod still up..."; \
54+
PID="$(echo $MATCH | awk '{print $7}' | cut -f1 -d'/')"; \
55+
if [[ "$PID" == "" ]]; then echo "failed to find PID"; break; fi; \
56+
echo "sudo killing -9 $PID..."; \
57+
sudo kill -9 $PID; \
58+
echo "... killed?!"; \
59+
sleep 3; \
60+
done
61+
xvfb-run --auto-servernum npm run test:karma
62+
npm run compile

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ npm-debug.log
33
node_modules/
44
lib/
55
lib-cov
6-
coverage
6+
coverage/
77
.lock-wscript
88
.idea/
99
*.iml

.travis.yml

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

0 commit comments

Comments
 (0)