Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into patch-1
  • Loading branch information
Mte90 committed Oct 16, 2020
2 parents 4d81a09 + 7912a32 commit 2e52832
Show file tree
Hide file tree
Showing 84 changed files with 23,803 additions and 14,790 deletions.
11 changes: 9 additions & 2 deletions .eslintrc.json
Expand Up @@ -11,7 +11,7 @@
"plugin:@typescript-eslint/eslint-recommended"
],
"rules": {
"prettier/prettier": "off",
"prettier/prettier": "warn",
"vue/require-default-prop": "off",
"vue/prop-name-casing": "off",
"vue/name-property-casing": "off",
Expand All @@ -20,7 +20,14 @@
"@typescript-eslint/no-var-requires": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/no-this-alias": "warn",
"@typescript-eslint/no-unused-vars": ["warn", {"argsIgnorePattern": "^_"}],
"@typescript-eslint/no-this-alias": [
"warn",
{
"allowDestructuring": true,
"allowedNames": ["that"]
}
],
"prefer-rest-params": "warn",
"no-shadow": [
"warn",
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,26 @@
name: Lint

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

jobs:
lint:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Run linting
run: make lint
46 changes: 46 additions & 0 deletions .github/workflows/nodejs.yml
@@ -0,0 +1,46 @@
# 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: Build

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

jobs:
build:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm test
- name: Serve webui
run: npm run serve &
- name: Run e2e tests with testcafe
uses: DevExpress/testcafe-action@latest
with:
args: "chrome test/e2e/"
- name: Upload screenshots
uses: actions/upload-artifact@v2-preview
with:
name: screenshots
path: screenshots/*


1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ test/unit/coverage
test/e2e/reports
*.swp
__pycache__
screenshots
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierrc.yml
Expand Up @@ -2,3 +2,5 @@ singleQuote: true
trailingComma: 'es5'
tabWidth: 2
printWidth: 100
arrowParens: "avoid"
endOfLine: "lf"
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

28 changes: 20 additions & 8 deletions Makefile
@@ -1,27 +1,39 @@
.PHONY: install build dev test clean aw-client-js
.PHONY: install build dev test clean

.FORCE: ;

# This is to disable check for new release in aw-webui for aw-android
ifdef ON_ANDROID
# The following flag will pass --android as a command line argument to vue-cli-service
# https://docs.npmjs.com/cli/run-script
androidflag := -- --os=android
else
androidflag :=
endif

build: install
npm run build
npm run build ${androidflag}

install: aw-client-js
npm install
install:
npm ci

uninstall:
rm -r node_modules/

dev:
npm run serve
npm run serve ${androidflag}

test:
npm test

test-e2e:
testcafe firefox test/e2e/

clean:
rm -rf node_modules dist

lint:
npx eslint --ext=js,vue src/
npx eslint --ext=js,ts,vue --max-warnings=0 src/ test/

aw-client-js:
make --directory=aw-client-js build
lint-fix:
npx eslint --ext=js,ts,vue --fix src/ test/
1 change: 0 additions & 1 deletion aw-client-js
Submodule aw-client-js deleted from 79a75b
1 change: 1 addition & 0 deletions babel.config.js
@@ -1,6 +1,7 @@
module.exports = {
// TODO: We should try to switch to the @vue/app preset, but right now it breaks everything
//presets: ['@vue/app'],
presets: ['@vue/cli-plugin-babel/preset'],
plugins: ['lodash', '@babel/plugin-syntax-dynamic-import'],
comments: false,
};
31 changes: 29 additions & 2 deletions jest.config.js
@@ -1,4 +1,31 @@
// Tests can be added in the aw-webui/test folder
// File names that end with .test.js will be run in the jsdom testEnvironment
// File names that end with .test.node.js will be run in the node testEnvironment

module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
projects: [
{
displayName: 'jsdom',
preset: '@vue/cli-plugin-unit-jest',
testEnvironment: 'jsdom',
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': 'vue-jest',
},
testMatch: ['**/test/**/*.test.js?(x)'],
moduleNameMapper: {
'^~/(.+)$': '<rootDir>/src/$1',
},
modulePathIgnorePatterns: ['test/e2e/screenshot.test.js'], // Don't run this file in npm test
},
{
displayName: 'node',
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/test/**/*.test.node.js?(x)'],
moduleNameMapper: {
'^~/(.+)$': '<rootDir>/src/$1',
},
},
],
};

0 comments on commit 2e52832

Please sign in to comment.