Skip to content

Commit 32bf91f

Browse files
authored
Merge pull request #18 from codersforcauses/init
Finish init
2 parents 234d03f + b7e26c0 commit 32bf91f

16 files changed

Lines changed: 2239 additions & 562 deletions

File tree

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
name: frontend ci
1+
name: Frontend CI/CD
22

33
on:
44
push:
5+
paths:
6+
- client/**
57
branches:
68
- main
79
- master
810
pull_request:
11+
paths:
12+
- client/**
913
branches:
1014
- main
1115
- master
@@ -53,3 +57,6 @@ jobs:
5357
- name: Run tests 🧪
5458
run: yarn test
5559
working-directory: client
60+
61+
- name: Upload Coverage ☂️
62+
uses: codecov/codecov-action@v3.1.0

client/.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
jest: true,
6+
},
7+
extends: ['plugin:vue/essential', 'standard', 'prettier'],
8+
parserOptions: {
9+
ecmaVersion: 'latest',
10+
sourceType: 'module',
11+
},
12+
plugins: ['vue'],
13+
rules: {},
14+
};

client/cypress.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const { defineConfig } = require('cypress');
2+
3+
module.exports = defineConfig({
4+
e2e: {
5+
setupNodeEvents(on, config) {
6+
// implement node event listeners here
7+
},
8+
},
9+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "hello@cypress.io",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}

client/cypress/support/commands.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
//
11+
//
12+
// -- This is a parent command --
13+
// Cypress.Commands.add('login', (email, password) => { ... })
14+
//
15+
//
16+
// -- This is a child command --
17+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
18+
//
19+
//
20+
// -- This is a dual command --
21+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
22+
//
23+
//
24+
// -- This will overwrite an existing command --
25+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })

client/cypress/support/e2e.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ***********************************************************
2+
// This example support/e2e.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands';
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')

client/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dependencies": {
1616
"@nuxtjs/axios": "5.13.6",
1717
"core-js": "3.23.1",
18+
"cypress": "^10.1.0",
1819
"nuxt": "2.15.8",
1920
"vue": "2.6.14",
2021
"vue-server-renderer": "2.6.14",
@@ -26,8 +27,15 @@
2627
"@vue/test-utils": "1.3.0",
2728
"babel-core": "7.0.0-bridge.0",
2829
"babel-jest": "27.5.1",
30+
"eslint": "^8.0.1",
2931
"eslint-config-prettier": "8.5.0",
30-
"jest": "27.5.1",
32+
"eslint-config-standard": "^17.0.0",
33+
"eslint-plugin-import": "^2.25.2",
34+
"eslint-plugin-n": "^15.0.0",
35+
"eslint-plugin-promise": "^6.0.0",
36+
"eslint-plugin-vue": "^9.1.1",
37+
"jest": "^28.1.1",
38+
"jest-environment-jsdom": "^28.1.1",
3139
"postcss": "8.4.14",
3240
"prettier": "2.7.1",
3341
"vue-jest": "3.0.7"

0 commit comments

Comments
 (0)