Skip to content

Commit b3882a8

Browse files
Merge pull request #4 from gemini-testing/TESTPLANE-861.testing_service
Refresh project
2 parents 57325cd + edb8c81 commit b3882a8

56 files changed

Lines changed: 4997 additions & 5608 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
id-token: write
13+
14+
jobs:
15+
# Build job
16+
build:
17+
environment: CI
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
- run: npm ci
25+
- run: npm run build
26+
- name: Deploy bookstore to S3 production
27+
uses: jakejarvis/s3-sync-action@v0.5.1
28+
with:
29+
args: --acl public-read --follow-symlinks
30+
env:
31+
AWS_S3_BUCKET: testplane-bookstore
32+
AWS_ACCESS_KEY_ID: ${{ secrets.S3_PRODUCTION_ACCESS_KEY_ID }}
33+
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_PRODUCTION_SECRET_ACCESS_KEY }}
34+
AWS_S3_ENDPOINT: https://s3.yandexcloud.net/
35+
SOURCE_DIR: "dist"

.github/workflows/node.js.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [22.x]
19+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "npm"
28+
- run: npm ci
29+
- run: npm run build
30+
- run: npm run lint
31+
- run: npm run format:check

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
22

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
dist
3+
build
4+
coverage
5+
.next
6+
*.min.js
7+
package-lock.json
8+
public/mockServiceWorker.js

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"printWidth": 120,
5+
"tabWidth": 2,
6+
"useTabs": false,
7+
"trailingComma": "es5",
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid",
10+
"endOfLine": "lf"
11+
}

.storybook/main.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
/** @type { import('@storybook/react-vite').StorybookConfig } */
22
const config = {
33
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
4-
addons: [
5-
'@storybook/addon-links',
6-
'@storybook/addon-essentials',
7-
'@storybook/addon-interactions',
8-
],
4+
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'],
95
framework: {
106
name: '@storybook/react-vite',
117
options: {},
@@ -14,4 +10,4 @@ const config = {
1410
autodocs: 'tag',
1511
},
1612
};
17-
export default config;
13+
export default config;

.storybook/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ const preview = {
1313
},
1414
};
1515

16-
export default preview;
16+
export default preview;

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[Book Store](https://testplane-bookstore.website.yandexcloud.net/) for Testplane examples
22

33
### Getting started
4+
45
1. nvm use
56
2. npm ci
67
3. npm run build

eslint.config.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import js from '@eslint/js';
2+
import react from 'eslint-plugin-react';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import prettierConfig from 'eslint-config-prettier';
6+
7+
export default [
8+
{
9+
ignores: ['dist', 'node_modules', 'public/mockServiceWorker.js'],
10+
},
11+
// Config files (Node.js environment)
12+
{
13+
files: ['*.config.js', '*.config.cjs'],
14+
languageOptions: {
15+
ecmaVersion: 'latest',
16+
sourceType: 'module',
17+
globals: {
18+
__dirname: 'readonly',
19+
__filename: 'readonly',
20+
require: 'readonly',
21+
module: 'readonly',
22+
exports: 'writable',
23+
process: 'readonly',
24+
},
25+
},
26+
rules: {
27+
...js.configs.recommended.rules,
28+
},
29+
},
30+
// React application files
31+
{
32+
files: ['src/**/*.{js,jsx}'],
33+
languageOptions: {
34+
ecmaVersion: 'latest',
35+
sourceType: 'module',
36+
parserOptions: {
37+
ecmaFeatures: {
38+
jsx: true,
39+
},
40+
},
41+
globals: {
42+
window: 'readonly',
43+
document: 'readonly',
44+
navigator: 'readonly',
45+
console: 'readonly',
46+
setTimeout: 'readonly',
47+
clearTimeout: 'readonly',
48+
setInterval: 'readonly',
49+
clearInterval: 'readonly',
50+
fetch: 'readonly',
51+
localStorage: 'readonly',
52+
sessionStorage: 'readonly',
53+
FormData: 'readonly',
54+
URL: 'readonly',
55+
URLSearchParams: 'readonly',
56+
alert: 'readonly',
57+
confirm: 'readonly',
58+
prompt: 'readonly',
59+
},
60+
},
61+
plugins: {
62+
react,
63+
'react-hooks': reactHooks,
64+
'react-refresh': reactRefresh,
65+
},
66+
rules: {
67+
...js.configs.recommended.rules,
68+
...react.configs.recommended.rules,
69+
...react.configs['jsx-runtime'].rules,
70+
...reactHooks.configs.recommended.rules,
71+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
72+
'react/prop-types': 'off',
73+
'react/no-unescaped-entities': 'off',
74+
'no-unused-vars': [
75+
'error',
76+
{
77+
varsIgnorePattern: '^React$',
78+
argsIgnorePattern: '^_',
79+
},
80+
],
81+
// Disable formatting rules that conflict with Prettier
82+
...prettierConfig.rules,
83+
},
84+
settings: {
85+
react: {
86+
version: 'detect',
87+
},
88+
},
89+
},
90+
];

index.html

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
4-
<head>
3+
<head>
54
<meta charset="UTF-8" />
65
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<meta name="description" content="BookStore - Online bookstore for all your reading needs" />
8-
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
9-
<link rel="preconnect" href="https://fonts.googleapis.com">
10-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11-
<link
12-
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Merriweather:wght@400;700&display=swap"
13-
rel="stylesheet">
7+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
8+
<link rel="stylesheet" href="https://testplane-bookstore.website.yandexcloud.net/assets/fonts/index.css" />
149
<title>BookStore</title>
15-
</head>
10+
</head>
1611

17-
<body>
12+
<body>
1813
<div id="root"></div>
1914
<script type="module" src="/src/main.jsx"></script>
20-
</body>
21-
22-
</html>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)