Skip to content

Commit

Permalink
Merge branch 'master' into dev/calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Sep 14, 2020
2 parents 2b6f6c3 + 707c45a commit 376e44f
Show file tree
Hide file tree
Showing 64 changed files with 4,346 additions and 1,898 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:
run: npm run build
- name: Run tests
run: npm test
- name: Run linting
run: make lint
- name: Serve webui
run: npm run serve &
- name: Run e2e tests with testcafe
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ singleQuote: true
trailingComma: 'es5'
tabWidth: 2
printWidth: 100
arrowParens: "avoid"
endOfLine: "lf"
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

.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:
npm ci
Expand All @@ -12,7 +21,7 @@ uninstall:
rm -r node_modules/

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

test:
npm test
Expand All @@ -24,7 +33,7 @@ clean:
rm -rf node_modules dist

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

lint-fix:
npx eslint --ext=js,ts,vue --fix src/
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
Original file line number Diff line number Diff line change
@@ -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,
};
33 changes: 30 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -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',
}
}
]
};
Loading

0 comments on commit 376e44f

Please sign in to comment.