Skip to content

Commit 9e8122d

Browse files
qunabuMateusz WojczalSzymonMrzyglod
authored
Migratin to new version of Ant Design Pro. From 3 to 4 (#1002)
* WIP. Migratin to new version of Ant Design Pro * progress * progress * progress * progress * progress * progress * fixed types and addedd issues to be fixed * fixed types and addedd issues to be fixed * fixed types and addedd issues to be fixed * notes * adding support for multidomain and fixing ARG docker missing * missing e2e tests * replacing npm with yarn in state state * fix: translate * login page fix * login page fix --------- Co-authored-by: Mateusz Wojczal <[email protected]> Co-authored-by: Szymon <[email protected]>
1 parent e650cb9 commit 9e8122d

File tree

414 files changed

+4553
-2393
lines changed

Some content is hidden

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

414 files changed

+4553
-2393
lines changed

.env.local

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ dist
88
mock
99
cypress.config.ts
1010
/cypress
11+
src/service-worker.js

.github/workflows/docker_build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
- uses: actions/setup-node@v3
1313
with:
14-
node-version: 16
14+
node-version: 20
1515

1616
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
1717
env:
@@ -75,5 +75,7 @@ jobs:
7575

7676
- name: Send webook to hooks to rollout all devs on k8s
7777
uses: distributhor/workflow-webhook@v3
78+
with:
79+
webhook_url: ${{ secrets.K8S_WEBHOOK_URL_ADMIN_LATEST }}
7880
env:
7981
webhook_url: ${{ secrets.K8S_WEBHOOK_URL_ADMIN_LATEST }}

.github/workflows/e2e-playwright.js.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
pull_request:
1212

1313
jobs:
14-
1514
playwright-e2e:
1615
runs-on: ubuntu-latest
1716

@@ -28,25 +27,24 @@ jobs:
2827
POSTGRES_DB: default
2928
POSTGRES_USER: default
3029
POSTGRES_PASSWORD: secret
31-
TZ: Europe/Warsaw
30+
TZ: Europe/Warsaw
3231
ports:
3332
- 5432:5432
3433

3534
redis:
3635
image: redis
3736

38-
api:
37+
api:
3938
image: escolalms/api:latest
4039
ports:
4140
- 80:80
4241

4342
options: >-
44-
--name api
45-
--env LARAVEL_REDIS_PASSWORD= --env VAR2=value2
43+
--name api --env LARAVEL_REDIS_PASSWORD= --env VAR2=value2
4644
47-
steps:
4845
49-
- run: |
46+
steps:
47+
- run: |
5048
docker exec -u 1000 api echo "APP_NAME=Wellms Playwright Demo \
5149
APP_ENV=local \
5250
APP_KEY=base64:pveos6JL8iCwO3MbzoyQpNx6TETMYuUpfZ18CDKl6Cw= \
@@ -77,22 +75,21 @@ jobs:
7775
TRACKER_ENABLED=false" >> .env
7876
7977
- run: docker exec -u 1000 api cat .env
80-
- run: docker exec -u 1000 api php artisan config:cache
78+
- run: docker exec -u 1000 api php artisan config:cache
8179
- run: docker exec -u 1000 api composer dumpautoload
8280
- run: docker exec -u 1000 api php artisan key:generate --force --no-interaction
8381
- run: docker exec -u 1000 api php artisan passport:keys --force --no-interaction
8482
- run: docker exec -u 1000 api php artisan migrate --force --no-interaction
8583
- run: docker exec -u 1000 api php artisan passport:client --personal --no-interaction
8684
- run: docker exec -u 1000 api php artisan db:seed --force --no-interaction
8785

88-
8986
- uses: actions/checkout@v2
9087
with:
9188
fetch-depth: 1
9289

9390
- uses: actions/setup-node@v3
9491
with:
95-
node-version: 16
92+
node-version: 20
9693

9794
- name: Cache node modules
9895
id: cache-npm
@@ -116,8 +113,8 @@ jobs:
116113
- name: Node dependencies
117114
run: npm i --legacy-peer-deps
118115

119-
- name: Build
120-
run: cp .env.ci .env && REACT_APP_API_URL=http://localhost npm run --openssl-legacy-provider build
116+
- name: Build
117+
run: cp .env.ci .env && REACT_APP_API_URL=http://localhost npm run --openssl-legacy-provider build
121118

122119
- name: Install Playwright
123120
run: npx playwright install --with-deps
@@ -129,4 +126,3 @@ jobs:
129126
with:
130127
name: test-results
131128
path: test-results
132-

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 16
16+
node-version: 20
1717

1818
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
1919
env:

.github/workflows/prettier.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [18.x]
15+
node-version: [20]
1616

1717
steps:
1818
- uses: actions/checkout@v2
@@ -23,4 +23,4 @@ jobs:
2323
- name: yarn install
2424
run: yarn
2525
- name: prettier
26-
run: yarn prettier --check src
26+
run: yarn prettier --check src

.github/workflows/unit.yml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,51 @@ on:
1010
types: [assigned, opened, synchronize, reopened]
1111

1212
jobs:
13-
14-
# jest:
15-
# runs-on: ubuntu-latest
16-
17-
# steps:
18-
# - uses: actions/checkout@v2
19-
# - name: Use Node.js
20-
# uses: actions/setup-node@v1
21-
# with:
22-
# node-version: '14.x'
23-
# - run: npm i
24-
# - run: npm run test
25-
26-
# - name: Code Coverage upload
27-
# uses: codecov/codecov-action@v1
28-
# with:
29-
# files: ./coverage/clover.xml # optional
13+
# jest:
14+
# runs-on: ubuntu-latest
15+
16+
# steps:
17+
# - uses: actions/checkout@v2
18+
# - name: Use Node.js
19+
# uses: actions/setup-node@v1
20+
# with:
21+
# node-version: '14.x'
22+
# - run: npm i
23+
# - run: npm run test
24+
25+
# - name: Code Coverage upload
26+
# uses: codecov/codecov-action@v1
27+
# with:
28+
# files: ./coverage/clover.xml # optional
3029

3130
lint:
3231
runs-on: ubuntu-latest
3332
strategy:
3433
matrix:
35-
node: [ 16, 18 ]
36-
name: Lint test ${{ matrix.node }}
37-
34+
node: [20]
35+
name: Lint test ${{ matrix.node }}
36+
3837
steps:
3938
- uses: actions/checkout@v2
4039
- name: Use Node.js
4140
uses: actions/setup-node@v1
4241
with:
43-
node-version: '14.x'
44-
- run: npm i
45-
- run: npm run lint:js
42+
node-version: '20.x'
43+
- run: yarn
44+
- run: yarn lint:js
4645

4746
tsc:
4847
runs-on: ubuntu-latest
4948
strategy:
5049
matrix:
51-
node: [ 14, 16, 18 ]
52-
name: TypeScript test ${{ matrix.node }}
53-
50+
node: [20]
51+
name: TypeScript test ${{ matrix.node }}
52+
5453
steps:
5554
- uses: actions/checkout@v2
5655
- name: Use Node.js
5756
uses: actions/setup-node@v1
5857
with:
59-
node-version: '14.x'
60-
- run: npm i
61-
- run: npm run tsc:noemit
58+
node-version: '20.x'
59+
- run: yarn
60+
- run: yarn tsc:noemit

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16-buster AS base
1+
FROM node:20-buster AS base
22

33
# docker image build -t abc . && docker run -p 80:80 --env API_URL="https://api-stage.escolalms.com" abc
44

@@ -7,9 +7,10 @@ COPY / /home/node/app
77
RUN apt-get update && apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev -y
88
RUN yarn install --network-timeout 1000000000 && yarn run build && cp dist/index.html dist/tpl.html
99

10-
FROM httpd:latest AS httpd
10+
FROM php:apache AS httpd
1111
ENV API_URL="http://localhost:1000"
1212
ENV SENTRYDSN=""
1313
ENV YBUG=""
14-
COPY entrypoint.sh /usr/local/bin/httpd-foreground
15-
COPY --from=base /home/node/app/dist /usr/local/apache2/htdocs/
14+
COPY entrypoint.sh /usr/local/bin/docker-php-entrypoint
15+
COPY --from=base /home/node/app/dist /var/www/html
16+
COPY config/php/index.php /var/www/html/index.php

config/config.dev.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)