Skip to content

Commit

Permalink
Merge pull request #31 from Open-Study-College/dev
Browse files Browse the repository at this point in the history
Release v0.1.0
  • Loading branch information
aaacafe786 authored Jul 27, 2022
2 parents 3862bb2 + 25243e9 commit 7d15f05
Show file tree
Hide file tree
Showing 146 changed files with 55,066 additions and 15,102 deletions.
28 changes: 14 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
* @type {import('@types/eslint').Linter.BaseConfig}
*/
module.exports = {
extends: [
"@remix-run/eslint-config",
"@remix-run/eslint-config/node",
"@remix-run/eslint-config/jest-testing-library",
"prettier",
],
// we're using vitest which has a very similar API to jest
// (so the linting plugins work nicely), but it means we have to explicitly
// set the jest version.
settings: {
jest: {
version: 27,
},
},
extends: [
'@remix-run/eslint-config',
'@remix-run/eslint-config/node',
'@remix-run/eslint-config/jest-testing-library',
'prettier'
],
// we're using vitest which has a very similar API to jest
// (so the linting plugins work nicely), but it means we have to explicitly
// set the jest version.
settings: {
jest: {
version: 27
}
}
};
72 changes: 72 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: "Bug Report"
description: "File a bug report"
body:
- type: "markdown"
attributes:
value: |
Thanks for creating an issue 😄!
Please search open/closed issues before submitting. Someone
might have asked the same thing before 😉!
Please help us help you by taking the time to
accurately fill out this template. ❤️
- type: "input"
id: "description"
attributes:
label: "Description"
description: "A brief description of the issue."
placeholder: |
When I ____, I expected ____ to happen but ____ happened instead.
validations:
required: true
- type: "input"
id: "reproduction"
attributes:
label: "Link to Reproduction"
description: |
A link to a sandbox url which demonstrates the bug. e.g. codesandbox
placeholder: "https://codesandbox.io/"
validations:
required: true
- type: "textarea"
id: "steps"
attributes:
label: "Steps to reproduce"
description: |
Explain how to cause the issue in the provided reproduction.
value: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
- type: "input"
id: "release-version"
attributes:
label: "Release Version"
description: "The version of the release you are currently using."
placeholder: "1.0.0"
validations:
required: true
- type: "input"
id: "browser"
attributes:
label: "Browser"
description: "The browser(s) this issue occurred with."
placeholder: "Google Chrome 100"
- type: "checkboxes"
id: "operating-system"
attributes:
label: "Operating System"
description: "The operating system(s) this issue occurred with."
options:
- label: "macOS"
- label: "Windows"
- label: "Linux"
- type: "textarea"
id: "additional-information"
attributes:
label: "Additional Information"
description: |
Use this section to provide any additional information you might have
like screenshots, notes, or links to ideas.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Documentation Request
url: https://github.com/Open-Study-College/osc-request-form/issues/new/choose
about: Request for documentation to be added/altered
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Feature Request"
description: "Request a feature or enhancement"
labels: ["needs triage"]
body:
- type: "markdown"
attributes:
value: |
Thanks for filing an issue 😄!
Please search open/closed issues before submitting. Someone
might have asked the same thing before 😉!
- type: "textarea"
id: "description"
attributes:
label: "Description"
description: "Please describe your request in one or two sentences."
validations:
required: true
- type: "textarea"
id: "justification"
attributes:
label: "Problem Statement/Justification"
description: |
Please provide valid reason(s) why this should be added to this project
If this feature is related to a problem you've noticed, mention it as
well.
validations:
required: true
- type: "textarea"
id: "proposed-solution"
attributes:
label: "Proposed Solution or API"
description: |
Please provide code snippets, gists, or links to the ideal
design or API.
validations:
required: true
- type: "textarea"
id: "alternatives"
attributes:
label: "Alternatives"
description: |
What alternative solutions have you considered before making this
request?
- type: "textarea"
id: "additional-information"
attributes:
label: "Additional Information"
description: |
What resources (links, screenshots, etc.) do you have to assist this
effort?
28 changes: 28 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!---
Thanks for creating a Pull Request 💖!
Please read the following before submitting:
- PRs that adds new external dependencies might take a while to review.
- Keep your PR as small as possible.
- Limit your PR to one type (docs, feature, refactoring, ci, or bugfix)
-->

Closes # <!-- Github issue # here -->

## 📝 Description

> Add a brief description
## ⛳️ Current behavior (updates)

> Please describe the current behavior that you are modifying
## 🚀 New behavior

> Please describe the behavior or changes this PR adds
## 💣 Is this a breaking change (Yes/No):

<!-- If Yes, please describe the impact and migration path for users. -->

## 📝 Additional Information
26 changes: 26 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .github/workflows/chromatic.yml

# Workflow name
name: "Chromatic"

# Event for the workflow
on: push

# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: yarn
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true # 👈 Option to prevent the workflow from failing
34 changes: 34 additions & 0 deletions .github/workflows/destroy-apps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Main App
on:
pull_request:
types: [closed]
branches:
- main
- dev

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FLY_REGION: iad

jobs:
destroy_staging_app:
runs-on: ubuntu-latest

environment:
name: pr-${{ github.event.number }}
url: ${{ steps.deploy.outputs.url }}

steps:
- uses: actions/checkout@v2

- name: 👀 Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: "fly.toml"
field: "app"

- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl apps destroy pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }} -y
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
27 changes: 12 additions & 15 deletions .github/workflows/pr-branches.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: PR Branch App
on:
pull_request:
types: [opened, reopened, synchronize]
types: [opened, reopened, synchronize]

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FLY_REGION: iad

jobs:

build:
name: 🐳 Build PR Branch
runs-on: ubuntu-latest
Expand All @@ -18,7 +17,7 @@ jobs:

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: What
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV

Expand All @@ -35,15 +34,15 @@ jobs:
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# Setup cache
# Setup cache
- name: ⚡️ Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
${{ runner.os }}-buildx-
- name: 🔑 Fly Registry Auth
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -72,6 +71,7 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
deploy:
needs: build
name: 🚀 Deploy PR Branch
runs-on: ubuntu-latest

Expand Down Expand Up @@ -106,31 +106,28 @@ jobs:
uses: superfly/[email protected]
continue-on-error: true
with:
args:
"create pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }} --org open-study-college"
args: "apps create pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }} --org open-study-college"

- name: Create session secret
uses: superfly/[email protected]
continue-on-error: true
with:
args:
"secrets set SESSION_SECRET=${{ secrets.FLY_PR_BRANCH_SESSION_SECRET }} --config ./fly-pr.toml --app pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }}"

args: "secrets set SESSION_SECRET=${{ secrets.FLY_PR_BRANCH_SESSION_SECRET }} --config ./fly-pr.toml --app pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }}"

- name: Create volume
uses: superfly/[email protected]
continue-on-error: true
with:
args:
"volumes create data --region lhr --size 1 --app pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }}"
args: "volumes create data --region lhr --size 1 --app pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }}"

- name: 🚀 Deploy PR Branch
if: ${{ github.ref != 'refs/heads/main' }}
id: deploy_pr
uses: superfly/[email protected]
with:
image: registry.fly.io/${{ steps.app_name.outputs.value }}:${{ env.BRANCH }}-${{ github.sha }}
org: "open-study-college"
name: pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }}
args: "deploy --build-arg SESSION_SECRET=${{ secrets.FLY_PR_BRANCH_SESSION_SECRET }} --app pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }} --image registry.fly.io/${{ steps.app_name.outputs.value }}:${{ env.BRANCH }}-${{ github.sha }}"
args: "deploy --build-arg SESSION_SECRET=${{ secrets.FLY_PR_BRANCH_SESSION_SECRET }} --app pr-${{ github.event.number }}-${{ steps.app_name.outputs.value }}"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@ node_modules

/build
/public/build
/storybook-static
.env

/cypress/screenshots
/cypress/videos
/prisma/data.db
/prisma/data.db-journal

/app/styles/tailwind.css
*.log
.DS_Store
/.cache
*.css.map
/storybook-static
package-lock.json
yarn.lock
*.css
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run build:css
npx lint-staged
1 change: 1 addition & 0 deletions .node-persist/storage/b48b13e73a6ac2a86dc54425dd24d9ff
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"key":"subscription","value":{"endpoint":"https://fcm.googleapis.com/fcm/send/cVuBSFbkti0:APA91bH7Wta8DEXqEUJ5OZxpSEwtsEfi42DZv-8SC7lnGNQwCetI7Yc2dFIl5fPyjeJFiG0NMFjSgD1ug_VSumYQ_cf8MXcpEXLKmTXsMCUNnu3FI0oh7hDJIQQBA1p26lu20-a4PrAk","expirationTime":null,"keys":{"p256dh":"BMMtPoDDFhA7uicwi-ZlCib4azhmhtSVLRMewpBD_xrUid8ezVB2OpQpnOUmCY3wxRgKp04g-9CUWqUuaeYOm90","auth":"NwsPKdDP-29xOG3FPbpLpw"}}}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.14.2
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ node_modules
/build
/public/build
.env

/app/styles/tailwind.css
Loading

0 comments on commit 7d15f05

Please sign in to comment.