Skip to content

Commit

Permalink
Merge branch 'main' into addRaiseYourHand
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Jan 2, 2025
2 parents 6791ff3 + 5ab41ea commit d4d3029
Show file tree
Hide file tree
Showing 41 changed files with 7,074 additions and 6,082 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,16 @@ jobs:
sed -i "s#^REACT_APP_TURN_SERVER_URL=.*#REACT_APP_TURN_SERVER_URL=\"turn:${{ secrets.STAGING_TURN_URL }}\"#" .env.production
sed -i "s#^REACT_APP_TURN_SERVER_USERNAME=.*#REACT_APP_TURN_SERVER_USERNAME=\"${{ secrets.STAGING_TURN_USERNAME }}\"#" .env.production
sed -i "s#^REACT_APP_TURN_SERVER_CREDENTIAL=.*#REACT_APP_TURN_SERVER_CREDENTIAL=\"${{ secrets.STAGING_TURN_PASSWORD }}\"#" .env.production
npm install
npm install --legacy-peer-deps
npm run build
cd ..
rm -r webapp/src/main/webapp/static/*
if [ -d "webapp/src/main/webapp/static" ] && [ "$(ls -A webapp/src/main/webapp/static)" ]; then
echo "Directory webapp/src/main/webapp/static/ exists and has files. Removing files..."
rm -rf webapp/src/main/webapp/static/*
echo "All files in webapp/src/main/webapp/static/ have been removed."
else
echo "Directory webapp/src/main/webapp/static/ is either empty or does not exist. No files to remove."
fi
cp -a react/build/. webapp/src/main/webapp
- name: Build Maven project for webinar
Expand All @@ -112,10 +118,16 @@ jobs:
sed -i "s#^REACT_APP_TURN_SERVER_URL=.*#REACT_APP_TURN_SERVER_URL=\"turn:${{ secrets.STAGING_TURN_URL }}\"#" .env.production
sed -i "s#^REACT_APP_TURN_SERVER_USERNAME=.*#REACT_APP_TURN_SERVER_USERNAME=\"${{ secrets.STAGING_TURN_USERNAME }}\"#" .env.production
sed -i "s#^REACT_APP_TURN_SERVER_CREDENTIAL=.*#REACT_APP_TURN_SERVER_CREDENTIAL=\"${{ secrets.STAGING_TURN_PASSWORD }}\"#" .env.production
npm install
npm install --legacy-peer-deps
npm run build
cd ..
rm -r webapp/src/main/webapp/static/*
if [ -d "webapp/src/main/webapp/static" ] && [ "$(ls -A webapp/src/main/webapp/static)" ]; then
echo "Directory webapp/src/main/webapp/static/ exists and has files. Removing files..."
rm -rf webapp/src/main/webapp/static/*
echo "All files in webapp/src/main/webapp/static/ have been removed."
else
echo "Directory webapp/src/main/webapp/static/ is either empty or does not exist. No files to remove."
fi
cp -a react/build/. webapp/src/main/webapp
- name: Build Maven project for conferencing
Expand Down Expand Up @@ -175,7 +187,7 @@ jobs:
echo "ls:"
ls -al
cd react
npm install --include=dev
npm install --include=dev --legacy-peer-deps
npm test
- name: Upload coverage to Codecov
Expand Down Expand Up @@ -362,10 +374,16 @@ jobs:
sed -i "s#^REACT_APP_TURN_SERVER_URL=.*#REACT_APP_TURN_SERVER_URL=\"turn:${{ secrets.STAGING_TURN_URL }}\"#" .env.production
sed -i "s#^REACT_APP_TURN_SERVER_USERNAME=.*#REACT_APP_TURN_SERVER_USERNAME=\"${{ secrets.STAGING_TURN_USERNAME }}\"#" .env.production
sed -i "s#^REACT_APP_TURN_SERVER_CREDENTIAL=.*#REACT_APP_TURN_SERVER_CREDENTIAL=\"${{ secrets.STAGING_TURN_PASSWORD }}\"#" .env.production
npm install
npm install --legacy-peer-deps
npm run build
cd ..
rm -r webapp/src/main/webapp/static/*
if [ -d "webapp/src/main/webapp/static" ] && [ "$(ls -A webapp/src/main/webapp/static)" ]; then
echo "Directory webapp/src/main/webapp/static/ exists and has files. Removing files..."
rm -rf webapp/src/main/webapp/static/*
echo "All files in webapp/src/main/webapp/static/ have been removed."
else
echo "Directory webapp/src/main/webapp/static/ is either empty or does not exist. No files to remove."
fi
cp -a react/build/. webapp/src/main/webapp
- name: Publish to Maven Central
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ webapp/src/main/webapp/
react/.env.development
react/.idea/workspace.xml
react/.env.fakeeh
react/package-lock.json
test/run.sh
test/runw.sh
11 changes: 8 additions & 3 deletions createwar.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
cd react
npm install
npm install --legacy-peer-deps
npm run build
cd ..
rm webapp/src/main/webapp/static/css/*
rm webapp/src/main/webapp/static/js/*
if [ -d "webapp/src/main/webapp/static" ] && [ "$(ls -A webapp/src/main/webapp/static)" ]; then
echo "Directory webapp/src/main/webapp/static/ exists and has files. Removing files..."
rm -rf webapp/src/main/webapp/static/*
echo "All files in webapp/src/main/webapp/static/ have been removed."
else
echo "Directory webapp/src/main/webapp/static/ is either empty or does not exist. No files to remove."
fi
cp -a react/build/. webapp/src/main/webapp


Expand Down
8 changes: 8 additions & 0 deletions react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
plugins: [
'react-compiler',
],
rules: {
'react-compiler/react-compiler': 'error',
},
};
6 changes: 6 additions & 0 deletions react/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ module.exports = {
'@babel/preset-env',
['@babel/preset-react', {runtime: 'automatic'}],
],
plugins: [
['babel-plugin-react-compiler', {
'react-compiler/react-compiler': 'error',
}],
'babel-plugin-istanbul'
]
};
2 changes: 1 addition & 1 deletion react/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
coverageReporters: ["json", "lcov", "text", "clover"],
collectCoverageFrom: ['src/Components/*.js','src/pages/*.js'],
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
testEnvironment: 'jest-fixed-jsdom',
setupFiles: ['<rootDir>/.jest/setEnvVars.js'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleNameMapper:{
Expand Down
Loading

0 comments on commit d4d3029

Please sign in to comment.