Skip to content

Commit

Permalink
Merge pull request #72 from Disfactory/master
Browse files Browse the repository at this point in the history
Production deploy
  • Loading branch information
Yukaii authored Feb 10, 2021
2 parents e3ff647 + 09a71fc commit f22e07b
Show file tree
Hide file tree
Showing 20 changed files with 4,223 additions and 884 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ babel.config.js
postcss.config.js
vue.config.js
.eslintrc.js
jest.config.js
11 changes: 7 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ module.exports = {
env: {
node: true
},
plugins: ['testing-library', 'jest-dom'],
'extends': [
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:testing-library/recommended',
'plugin:testing-library/vue',
'plugin:jest-dom/recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
Expand All @@ -32,11 +36,10 @@ module.exports = {
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
'**/__tests__/*.{j,t}s?(x)'
],
env: {
mocha: true
jest: true
}
}
]
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,25 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Run test
- name: Run typecheck
run: |
npm ci
npm run typecheck
unit-test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Run unit test
run: |
npm ci
npm run test
dev-deploy:
needs: [lint, typecheck]
needs: [lint, typecheck, unit-test]
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.event_name == 'push' && github.ref == 'refs/heads/master'"
steps:
Expand All @@ -61,7 +74,7 @@ jobs:
COMMIT_MESSAGE: Deploy [ci skip]
FOLDER: dist
production-deploy:
needs: [lint, typecheck]
needs: [lint, typecheck, unit-test]
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.event_name == 'push' && github.ref == 'refs/heads/production'"
steps:
Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
setupFiles: ['<rootDir>/test/setup-files.ts'],
setupFilesAfterEnv: ['<rootDir>/test/setup-files-after-env.ts']
}
Loading

0 comments on commit f22e07b

Please sign in to comment.