Skip to content

Commit

Permalink
Migratin to new version of Ant Design Pro. From 3 to 4 (#1002)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Feb 14, 2024
1 parent e650cb9 commit 9e8122d
Show file tree
Hide file tree
Showing 414 changed files with 4,553 additions and 2,393 deletions.
1 change: 0 additions & 1 deletion .env.local

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist
mock
cypress.config.ts
/cypress
src/service-worker.js
4 changes: 3 additions & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- 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.
env:
Expand Down Expand Up @@ -75,5 +75,7 @@ jobs:

- name: Send webook to hooks to rollout all devs on k8s
uses: distributhor/workflow-webhook@v3
with:
webhook_url: ${{ secrets.K8S_WEBHOOK_URL_ADMIN_LATEST }}
env:
webhook_url: ${{ secrets.K8S_WEBHOOK_URL_ADMIN_LATEST }}
22 changes: 9 additions & 13 deletions .github/workflows/e2e-playwright.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
pull_request:

jobs:

playwright-e2e:
runs-on: ubuntu-latest

Expand All @@ -28,25 +27,24 @@ jobs:
POSTGRES_DB: default
POSTGRES_USER: default
POSTGRES_PASSWORD: secret
TZ: Europe/Warsaw
TZ: Europe/Warsaw
ports:
- 5432:5432

redis:
image: redis

api:
api:
image: escolalms/api:latest
ports:
- 80:80

options: >-
--name api
--env LARAVEL_REDIS_PASSWORD= --env VAR2=value2
--name api --env LARAVEL_REDIS_PASSWORD= --env VAR2=value2
steps:
- run: |
steps:
- run: |
docker exec -u 1000 api echo "APP_NAME=Wellms Playwright Demo \
APP_ENV=local \
APP_KEY=base64:pveos6JL8iCwO3MbzoyQpNx6TETMYuUpfZ18CDKl6Cw= \
Expand Down Expand Up @@ -77,22 +75,21 @@ jobs:
TRACKER_ENABLED=false" >> .env
- run: docker exec -u 1000 api cat .env
- run: docker exec -u 1000 api php artisan config:cache
- run: docker exec -u 1000 api php artisan config:cache
- run: docker exec -u 1000 api composer dumpautoload
- run: docker exec -u 1000 api php artisan key:generate --force --no-interaction
- run: docker exec -u 1000 api php artisan passport:keys --force --no-interaction
- run: docker exec -u 1000 api php artisan migrate --force --no-interaction
- run: docker exec -u 1000 api php artisan passport:client --personal --no-interaction
- run: docker exec -u 1000 api php artisan db:seed --force --no-interaction


- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Cache node modules
id: cache-npm
Expand All @@ -116,8 +113,8 @@ jobs:
- name: Node dependencies
run: npm i --legacy-peer-deps

- name: Build
run: cp .env.ci .env && REACT_APP_API_URL=http://localhost npm run --openssl-legacy-provider build
- name: Build
run: cp .env.ci .env && REACT_APP_API_URL=http://localhost npm run --openssl-legacy-provider build

- name: Install Playwright
run: npx playwright install --with-deps
Expand All @@ -129,4 +126,3 @@ jobs:
with:
name: test-results
path: test-results

2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- 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.
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20]

steps:
- uses: actions/checkout@v2
Expand All @@ -23,4 +23,4 @@ jobs:
- name: yarn install
run: yarn
- name: prettier
run: yarn prettier --check src
run: yarn prettier --check src
57 changes: 28 additions & 29 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,51 @@ on:
types: [assigned, opened, synchronize, reopened]

jobs:

# jest:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js
# uses: actions/setup-node@v1
# with:
# node-version: '14.x'
# - run: npm i
# - run: npm run test

# - name: Code Coverage upload
# uses: codecov/codecov-action@v1
# with:
# files: ./coverage/clover.xml # optional
# jest:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js
# uses: actions/setup-node@v1
# with:
# node-version: '14.x'
# - run: npm i
# - run: npm run test

# - name: Code Coverage upload
# uses: codecov/codecov-action@v1
# with:
# files: ./coverage/clover.xml # optional

lint:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 16, 18 ]
name: Lint test ${{ matrix.node }}
node: [20]
name: Lint test ${{ matrix.node }}

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm i
- run: npm run lint:js
node-version: '20.x'
- run: yarn
- run: yarn lint:js

tsc:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 14, 16, 18 ]
name: TypeScript test ${{ matrix.node }}
node: [20]
name: TypeScript test ${{ matrix.node }}

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm i
- run: npm run tsc:noemit
node-version: '20.x'
- run: yarn
- run: yarn tsc:noemit
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-buster AS base
FROM node:20-buster AS base

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

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

FROM httpd:latest AS httpd
FROM php:apache AS httpd
ENV API_URL="http://localhost:1000"
ENV SENTRYDSN=""
ENV YBUG=""
COPY entrypoint.sh /usr/local/bin/httpd-foreground
COPY --from=base /home/node/app/dist /usr/local/apache2/htdocs/
COPY entrypoint.sh /usr/local/bin/docker-php-entrypoint
COPY --from=base /home/node/app/dist /var/www/html
COPY config/php/index.php /var/www/html/index.php
15 changes: 0 additions & 15 deletions config/config.dev.ts

This file was deleted.

Loading

0 comments on commit 9e8122d

Please sign in to comment.