Skip to content

Commit 9f6a99d

Browse files
init welearn client project
0 parents  commit 9f6a99d

File tree

207 files changed

+13656
-0
lines changed

Some content is hidden

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

207 files changed

+13656
-0
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.github
2+
.git/
3+
e2e/
4+
node_modules/
5+
.dockerignore
6+
.eslintrc.cjs
7+
.gitignore
8+
.prettierrc.json
9+
Dockerfile
10+
env.
11+
README.md

.env.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
VITE_API_BASE=http://test
2+
VITE_API_VERSION=/api/v1
3+
VITE_WL_API_KEY=testWelearn

.eslintrc.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* eslint-env node */
2+
require('@rushstack/eslint-patch/modern-module-resolution');
3+
4+
module.exports = {
5+
root: true,
6+
extends: [
7+
'plugin:vue/vue3-essential',
8+
'eslint:recommended',
9+
'@vue/eslint-config-typescript',
10+
'@vue/eslint-config-prettier/skip-formatting'
11+
],
12+
parserOptions: {
13+
ecmaVersion: 'latest'
14+
},
15+
rules: {
16+
'@typescript-eslint/no-unused-vars': 'error'
17+
}
18+
};

.github/ISSUE_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Expected Behavior
2+
3+
## Actual Behavior
4+
5+
## Steps to Reproduce the Problem
6+
7+
1.
8+
9+
## Specifications
10+
11+
- Version:
12+
- Platform:
13+
- Subsystem:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
5+
<!--- Describe your changes in detail -->
6+
7+
## Why?
8+
9+
<!--- Why is this change required? What problem does it solve? -->
10+
<!--- If it fixes an open issue, please link to the issue here. -->
11+
12+
## How?
13+
14+
<!--- Please describe in detail how you tested your changes. -->
15+
<!--- Include details of your testing environment, tests ran to see how -->
16+
<!--- your change affects other areas of the code, etc. -->
17+
18+
## Screenshots (if appropriate):
19+
20+
## Types of changes
21+
22+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
23+
24+
- [ ] Bug fix (non-breaking change which fixes an issue)
25+
- [ ] New feature (non-breaking change which adds functionality)
26+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
27+
28+
## Checklist:
29+
30+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
31+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
32+
33+
- [ ] My code follows the code style of this project.
34+
- [ ] My code is tested.
35+
- [ ] I have updated the documentation accordingly.

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: WeLearn
2+
run-name: ${{ github.actor }} is testing WeLearn 🚀
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags:
8+
- '**'
9+
- '!**_deploy'
10+
11+
concurrency:
12+
group: ${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build-docker:
17+
uses: CyberCRI/github-workflows/.github/workflows/build-push.yaml@main
18+
with:
19+
registry-name: ${{ vars.DOCKER_PROD_REGISTRY }}
20+
image-name: welearn-client
21+
image-tag: ${{ github.sha }}
22+
recursive-submodule-checkout: true
23+
build-args: |
24+
VITE_API_BASE=$DOCKER_INJECT_VITE_API_BASE
25+
VITE_ENVIRONMENT=$DOCKER_INJECT_VITE_ENVIRONMENT
26+
VITE_WL_API_KEY=$DOCKER_INJECT_VITE_WL_API_KEY
27+
secrets:
28+
registry-username: ${{ secrets.DOCKER_PROD_USERNAME }}
29+
registry-password: ${{ secrets.DOCKER_PROD_PASSWORD }}
30+
submodules-app-id: ${{ secrets.INFRA_BOT_APP_ID }}
31+
submodules-app-installation-id: ${{ secrets.INFRA_BOT_APP_INSTALLATION_ID }}
32+
submodules-app-private-key: ${{ secrets.INFRA_BOT_APP_PRIVATE_KEY }}
33+
34+
lint-and-test:
35+
timeout-minutes: 60
36+
runs-on: wlc-lint-and-test-runner
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: actions/setup-node@v3
40+
with:
41+
node-version: 20
42+
- name: Install Yarn
43+
run: npm install -g yarn
44+
- name: Install dependencies
45+
run: yarn install --frozen-lockfile
46+
47+
- name: Run linter and formatter
48+
run: |
49+
yarn lint
50+
yarn format:check
51+
52+
- name: Run unit tests
53+
run: yarn test:unit
54+
55+
- name: Install Playwright Browsers
56+
run: yarn playwright install --with-deps
57+
- name: Run Playwright tests
58+
run: yarn playwright test
59+
- uses: actions/upload-artifact@v4
60+
if: always()
61+
with:
62+
name: playwright-report
63+
path: playwright-report/
64+
retention-days: 30
65+
66+
tag-deploy:
67+
needs:
68+
- lint-and-test
69+
- build-docker
70+
uses: CyberCRI/github-workflows/.github/workflows/tag-deploy.yaml@main

.github/workflows/delete-ref.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
on:
2+
delete:
3+
branches:
4+
- "*"
5+
tags:
6+
- "**"
7+
- "!**_deploy"
8+
9+
jobs:
10+
delete-ref:
11+
uses: CyberCRI/github-workflows/.github/workflows/delete-tag-deploy-when-matching-ref-deleted.yaml@main

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
test-results/
31+
playwright-report/
32+
33+
charts/
34+
test.yaml
35+
36+
.env
37+
.env.local

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "devops-toolbox"]
2+
path = devops-toolbox
3+
url = ../sops

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"trailingComma": "none"
7+
}

0 commit comments

Comments
 (0)