Skip to content

Commit

Permalink
Merge branch 'main' into timer-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
elhagen13 committed Nov 27, 2023
2 parents 1c0a004 + 0f457f1 commit cdeaa61
Show file tree
Hide file tree
Showing 52 changed files with 17,281 additions and 1,685 deletions.
Binary file modified .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
env:
browser: true
es2021: true
extends:
- eslint:recommended
- plugin:react/recommended
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- react
rules: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_DELIGHTFUL_MUSHROOM_0180DBF1E }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/packages/studywell-frontend" # App source code path
api_location: "" # Api source code path - optional
output_location: "build" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_DELIGHTFUL_MUSHROOM_0180DBF1E }}
action: "close"
19 changes: 19 additions & 0 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI Testing

on:
push:
branches:
- "*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm ci
- run: npm run -w studywell lint
- run: npm run -w studywell-frontend lint
- run: npm run -w studywell-frontend build
64 changes: 64 additions & 0 deletions .github/workflows/main_studywell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - StudyWell

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: "20.x"

- name: npm install, build, and test
run: |
npm install --workspaces=false
npm run -w studywell build --if-present
npm run -w studywell test --if-present
working-directory: studywell-backend

- name: Zip artifact for deployment
run: zip release.zip ./* -r
working-directory: studywell-backend

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: node-app
path: studywell-backend/release.zip

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: node-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: "Deploy to Azure Web App"
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: "StudyWell"
slot-name: "Production"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_05FCB290E24F4C88A2B1315011A17A7F }}
package: .
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"useTabs": false
}
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# StudyWell

Contributing:
1). All members of the team use the Prettier code formatter extension.
-Installation: All members can install the extension using VS Code's extension library.
1). All members of the team use the Prettier code formatter extension.
-Installation: All members can install the extension using VS Code's extension library.
2). The style guide is followed by Prettier's auto formatter some of these standards include :
-Proper spacing after function definitions
-Proper indentation
-Line wrapping
-Proper spacing after function definitions
-Proper indentation
-Line wrapping
3). Additionally, members should comment a description above each function stating its use


15 changes: 15 additions & 0 deletions eslint-errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

> [email protected] lint
> npx eslint . && npx prettier --check .


/Users/ellahagen/Documents/Classes/Fall2023/CSC307/StudyWell/packages/studywell-frontend/src/components/timer/Timer.js
30:6 warning React Hook useEffect has a missing dependency: 'audio'. Either include it or remove the dependency array react-hooks/exhaustive-deps

/Users/ellahagen/Documents/Classes/Fall2023/CSC307/StudyWell/packages/studywell-frontend/src/pages/MainScreen.js
3:27 warning 'useEffect' is defined but never used no-unused-vars

✖ 2 problems (0 errors, 2 warnings)

Checking formatting...
All matched files use Prettier code style!
Loading

0 comments on commit cdeaa61

Please sign in to comment.