Skip to content

Commit bb2e69c

Browse files
authored
Merge pull request #23 from SpringRoll/feature/unit-testing
Feature/unit testing
2 parents c96b632 + 4200968 commit bb2e69c

File tree

16 files changed

+1878
-236
lines changed

16 files changed

+1878
-236
lines changed

.eslintrc.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
module.exports = {
2+
root: true,
3+
parser: 'vue-eslint-parser',
4+
parserOptions: {
5+
parser: "babel-eslint",
6+
ecmaVersion: 2020,
7+
sourceType: "module"
8+
},
9+
env: {
10+
browser: true,
11+
node: true
12+
},
13+
extends: [
14+
'plugin:vue/recommended'
15+
],
16+
globals: {
17+
__static: true
18+
},
19+
plugins: [
20+
'vue'
21+
],
22+
rules: {
23+
"prefer-const": [
24+
"error",
25+
{
26+
destructuring: "any",
27+
ignoreReadBeforeAssign: false
28+
}
29+
],
30+
"space-before-blocks": [
31+
"error",
32+
{ functions: "always", "keywords": "always", "classes": "always" }
33+
],
34+
"keyword-spacing": ["error"],
35+
indent: ["error", 2],
36+
37+
"vue/max-attributes-per-line": "off",
38+
"vue/singleline-html-element-content-newline": "off",
39+
"vue/html-self-closing": "off",
40+
41+
semi: ["error", "always"],
42+
"no-console": [0],
43+
quotes: [2, "single"],
44+
curly: ["error", "all"],
45+
"no-var": "error",
46+
"require-jsdoc": [
47+
"error",
48+
{
49+
require: {
50+
FunctionDeclaration: true,
51+
MethodDefinition: true,
52+
ClassDeclaration: true,
53+
ArrowFunctionExpression: false,
54+
FunctionExpression: true
55+
}
56+
}
57+
]
58+
}
59+
}

.github/workflows/build-release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,34 @@ on:
66
- v1.*
77

88
jobs:
9+
full-test:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [10.x]
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
19+
- name: Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: npm install
25+
run: npm ci
26+
env:
27+
CI: true
28+
29+
- name: Running tests
30+
uses: GabrielBB/[email protected]
31+
with:
32+
run: npm test
33+
934
release:
35+
needs: full-test
36+
1037
runs-on: ${{ matrix.os }}
1138

1239
strategy:

.github/workflows/full-test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Full test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
full-test:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [10.x]
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
19+
- name: Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: npm install
25+
run: npm ci
26+
env:
27+
CI: true
28+
29+
- name: Running tests
30+
uses: GabrielBB/[email protected]
31+
with:
32+
run: npm test

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module.exports = {
22
presets: [
33
'@vue/cli-plugin-babel/preset'
44
]
5-
}
5+
};

0 commit comments

Comments
 (0)