Skip to content

Commit

Permalink
fix(deps): update mysql2 and setup github action ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rocwind committed Aug 18, 2021
1 parent eef567f commit 6ab24d3
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 343 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

services:
redis:
image: redis
ports:
- 6379:6379
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ test-integration:
coverage:
@echo "\n\nRunning coverage report..."
rm -rf coverage
# @NODE_ENV=test CONFIG_FILE=${ROOT}/config/config.test.js ./node_modules/istanbul/lib/cli.js cover --report lcovonly --dir coverage/core ./node_modules/.bin/_mocha \
# test/unit -- -R spec --recursive --timeout 15000
@NODE_ENV=test CONFIG_FILE=${ROOT}/config/config.test.js mocha test/api/init
@NODE_ENV=test PORT=3000 HOST=127.0.0.1 CONFIG_FILE=${ROOT}/config/config.test.js node bin/www &
@NODE_ENV=test CONFIG_FILE=${ROOT}/config/config.test.js ./node_modules/istanbul/lib/cli.js cover --report lcovonly --dir coverage/api ./node_modules/.bin/_mocha \
Expand Down
26 changes: 0 additions & 26 deletions appveyor.yml

This file was deleted.

38 changes: 19 additions & 19 deletions config/config.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var os = require('os');
var os = require("os");

var config = {};
config.test = {
db: {
username: "root",
password: null,
password: "password",
database: "codepush_test",
host: "127.0.0.1",
port: 3306,
Expand All @@ -15,10 +15,10 @@ config.test = {
local: {
storageDir: os.tmpdir(),
downloadUrl: "http://127.0.0.1:3000/download",
public: '/download'
public: "/download",
},
jwt: {
tokenSecret: 'INSERT_RANDOM_TOKEN_KEY'
tokenSecret: "INSERT_RANDOM_TOKEN_KEY",
},
common: {
tryLoginTimes: 10,
Expand All @@ -34,26 +34,26 @@ config.test = {
host: "127.0.0.1",
port: 6379,
retry_strategy: function (options) {
if (options.error.code === 'ECONNREFUSED') {
return new Error('The server refused the connection');
if (options.error.code === "ECONNREFUSED") {
return new Error("The server refused the connection");
}
if (options.total_retry_time > 1000 * 60 * 60) {
return new Error('Retry time exhausted');
return new Error("Retry time exhausted");
}
if (options.times_connected > 10) {
return undefined;
return undefined;
}
return Math.max(options.attempt * 100, 3000);
}
}
}
}
},
},
},
};
config.test.log4js = {
appenders: {console: { type: 'console'}},
categories : {
"default": { appenders: ['console'], level:'error'},
"startup": { appenders: ['console'], level:'info'},
"http": { appenders: ['console'], level:'info'}
}
}
appenders: { console: { type: "console" } },
categories: {
default: { appenders: ["console"], level: "error" },
startup: { appenders: ["console"], level: "info" },
http: { appenders: ["console"], level: "info" },
},
};
module.exports = config;
60 changes: 0 additions & 60 deletions config/config.testwin.js

This file was deleted.

Loading

0 comments on commit 6ab24d3

Please sign in to comment.