-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push to Prod
- Loading branch information
Showing
22 changed files
with
722 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Backend Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- server/** | ||
pull_request: | ||
paths: | ||
- server/** | ||
|
||
jobs: | ||
test_backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.5.3 | ||
|
||
- name: Start Docker | ||
run: docker-compose -f docker-compose.test.yml up --build -d | ||
|
||
- name: Run Tests | ||
run: cd server && yarn install && yarn test:actions |
36 changes: 19 additions & 17 deletions
36
.github/workflows/automated_tests.yml → .github/workflows/frontend_tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
name: automated_tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
|
||
jobs: | ||
build_frontend: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.5.3 | ||
|
||
- name: Build client | ||
run: cd client && yarn install && yarn build | ||
name: Frontend Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- client/** | ||
pull_request: | ||
paths: | ||
- client/** | ||
|
||
jobs: | ||
build_frontend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.5.3 | ||
|
||
- name: Build client | ||
run: cd client && yarn install && yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import React from 'react'; | ||
import { getFroshGroupSchedule } from '../../pages/Profile/functions'; | ||
import { Document, Page, Text, View, Svg, Line, Font, StyleSheet } from '@react-pdf/renderer'; | ||
import MainFroshLogo from '../../assets/logo/frosh-main-logo-with-bg.svg'; | ||
|
||
const styles = StyleSheet.create({ | ||
page: { | ||
backgroundColor: '#E4E4E4', | ||
}, | ||
eventBubble: { | ||
backgroundColor: '#58458f', | ||
borderRadius: '10px', | ||
padding: '10px', | ||
margin: '10px' | ||
}, | ||
eventName: { | ||
fontSize: 12, | ||
fontWeight: 'bold', | ||
padding: '10px 0', | ||
color: '#fff' | ||
}, | ||
eventLoc: { | ||
fontSize: 12, | ||
padding: '10px 0', | ||
color: '#fff' | ||
}, | ||
eventDate: { | ||
fontSize: 11, | ||
fontStyle: 'italic', | ||
color: '#fff', | ||
padding: '5px 0' | ||
}, | ||
eventDesc: { | ||
fontSize: 12, | ||
color: '#fff', | ||
padding: '10px 0' | ||
} | ||
}); | ||
|
||
const MakeSchedulePDF = (froshObject) => { | ||
const froshGroup = froshObject?.froshGroup; | ||
const scheduleData = getFroshGroupSchedule(froshGroup); | ||
|
||
return ( | ||
<Document> | ||
<Page size="A4" style={styles.page}> | ||
<View style={{ padding: '30px' }}> | ||
<Text style={{ fontSize: 16, color: '#2c1370', padding: '20px 0', fontWeight: 'bold' }}> | ||
F!rosh Schedule 2T3 | ||
</Text> | ||
<Svg height="10" width="500"> | ||
<Line x1="0" y1="0" x2="500" y2="0" strokeWidth={4} stroke="rgb(49,25,87)" /> | ||
</Svg> | ||
{Object.keys(scheduleData).map((day) => ( | ||
<div key={day}> | ||
<Text style={{ fontSize: 14, padding: '20px 0', color: '#2c1370', fontWeight: 'bold' }}> | ||
{day} | ||
</Text> | ||
{scheduleData[day].map((scheduleDay, index) => ( | ||
<div key={scheduleDay} style={styles.eventBubble}> | ||
<Text style={styles.eventName}> | ||
{scheduleDay['Event Name']} | ||
</Text> | ||
<Text style={styles.eventDate}> | ||
{scheduleDay['Start Time']} - {scheduleDay['End Time']} | ||
</Text> | ||
{scheduleDay['Event Location'] ? | ||
<Text style={styles.eventLoc}> | ||
{scheduleDay['Event Location']} | ||
</Text> : <></> | ||
} | ||
{scheduleDay['Event Description'] ? | ||
<Text style={styles.eventDesc}> | ||
{scheduleDay['Event Description']} | ||
</Text> : <></> | ||
} | ||
</div> | ||
))} | ||
</div> | ||
))} | ||
</View> | ||
</Page> | ||
</Document> | ||
); | ||
}; | ||
|
||
export { MakeSchedulePDF }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.