Skip to content

chore: migrate CI to github, refactore CI and npm scripts, linting fixes #1023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/CI.yml → .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@ jobs:
run: npm run bootstrap
- name: Build
run: npm run build
- name: linting
run: npm run lint
- name: end to end
run: npm run test:e2e
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Linting Checks

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
build:
runs-on: ubuntu-16.04
strategy:
matrix:
node-version: [10.x, 12.x, 13.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: bootstrap
run: npm run bootstrap
- name: Build
run: npm run build
- name: Linting
run: npm run lint
31 changes: 31 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Unit tests Suite

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
build:
runs-on: ubuntu-16.04
strategy:
matrix:
node-version: [10.x, 12.x, 13.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: bootstrap
run: npm run bootstrap
- name: Build
run: npm run build
- name: Unit tests
run: npm run test
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
"serve:ssr": "cross-env SSR=1 node server",
"dev": "run-p serve watch:*",
"dev:ssr": "run-p serve:ssr watch:*",
"lint": "eslint . --fix",
"test": "mocha test/*/**",
"lint": "eslint .",
"fixlint" : "eslint . --fix",
"test": "mocha ./test/**/*.test.js",
"testServer": "node cypress/setup.js",
"test:e2e": "start-server-and-test testServer http://localhost:3000 cy:run",
"posttest:e2e": "rimraf cypress/fixtures/docs",
Expand Down
4 changes: 4 additions & 0 deletions src/core/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,19 @@ export default function () {
if (config.loadSidebar === true) {
config.loadSidebar = '_sidebar' + config.ext
}

if (config.loadNavbar === true) {
config.loadNavbar = '_navbar' + config.ext
}

if (config.coverpage === true) {
config.coverpage = '_coverpage' + config.ext
}

if (config.repo === true) {
config.repo = ''
}

if (config.name === true) {
config.name = ''
}
Expand Down
3 changes: 2 additions & 1 deletion src/core/render/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ export function getAndRemoveConfig(str = '') {
.replace(/^'/, '')
.replace(/'$/, '')
.replace(/(?:^|\s):([\w-]+:?)=?([\w-]+)?/g, (m, key, value) => {
if(key.indexOf(':') === -1){
if (key.indexOf(':') === -1) {
config[key] = (value && value.replace(/"/g, '')) || true
return ''
}

return m
})
.trim()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.