generated from brown-ccv/honeycomb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 45f77e0
Showing
78 changed files
with
40,883 additions
and
0 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,38 @@ | ||
# Dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# Testing | ||
/coverage | ||
|
||
# Production | ||
/build | ||
/dist | ||
/out | ||
|
||
# Min Files | ||
/public/lib | ||
|
||
# No linting needed | ||
**/__tests__/ | ||
**/participant_responses | ||
**/firebase-service-account.json | ||
psiturkit/*_turk | ||
|
||
|
||
# Misc | ||
/.husky | ||
/.vscode | ||
/.env | ||
.env | ||
.DS_Store | ||
.gitignore | ||
|
||
# File types | ||
# TODO: Only running on js and jsx anyways? | ||
# *.md | ||
# *.json | ||
# *.loga | ||
# *.log | ||
# *.log* |
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,31 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
}, | ||
globals: { | ||
Atomics: "readonly", | ||
SharedArrayBuffer: "readonly", | ||
}, | ||
plugins: ["react", "prettier"], | ||
extends: ["eslint:recommended", "plugin:react/recommended", "prettier"], | ||
rules: { | ||
"react/prop-types": "off", | ||
"prettier/prettier": "warn", | ||
}, | ||
overrides: [{ files: ["*.jsx", "*.js"] }], | ||
}; |
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,5 @@ | ||
{ | ||
"projects": { | ||
"default": "ccv-honeycomb" | ||
} | ||
} |
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,32 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG]" | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari, electron] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy to Firebase Hosting on merge | ||
'on': | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npm install && npm run build:firebase | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CCV_HONEYCOMB }}' | ||
channelId: live | ||
projectId: ccv-honeycomb |
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,17 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy to Firebase Hosting on PR | ||
'on': pull_request | ||
jobs: | ||
build_and_preview: | ||
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npm install && npm run build:firebase | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CCV_HONEYCOMB }}' | ||
projectId: ccv-honeycomb |
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,53 @@ | ||
name: Pull Request | ||
|
||
# Runs the build and test scripts on PR | ||
on: pull_request | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-test: | ||
name: π§ͺ Build and Test | ||
runs-on: ${{ matrix.os }} | ||
|
||
# Run action for [home/clinic] with in [windows/macOS/ubuntu] | ||
strategy: | ||
matrix: | ||
setting: [home, clinic] | ||
os: [windows-latest, macOS-latest, ubuntu-latest] | ||
fail-fast: false # A failed build will not end the other matrix jobs | ||
|
||
steps: | ||
# Set up runner | ||
- name: β¬οΈ Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: β Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
- name: π Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
# Install dependencies and set up environment | ||
- name: π₯ Install Dependencies | ||
run: npm ci | ||
- name: π Load .env file (.env.${{matrix.setting}}) | ||
uses: xom9ikk/dotenv@v2 | ||
with: | ||
path: ./env | ||
mode: ${{matrix.setting}} | ||
|
||
# Test and build the app | ||
- name: π§ͺ Run Test | ||
run: npm test | ||
env: | ||
CI: true | ||
- name: π¬ Lint | ||
run: npm run lint | ||
- name: β Run Build | ||
run: npm run 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
name: Release | ||
|
||
# Runs the build and package scripts when a new tagged release is publishe, created or edited | ||
# Note that this runs for both releases and pre-releases: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release | ||
on: | ||
release: | ||
types: [created, edited, published] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
package-and-upload: | ||
name: Package and Upload | ||
runs-on: ${{ matrix.os }} | ||
|
||
# Run build script for [home/clinic] in [windows/macOS/ubuntu] | ||
strategy: | ||
matrix: | ||
setting: [home, clinic] | ||
os: [windows-latest, macOS-latest, ubuntu-latest] | ||
fail-fast: true # A failed build will not end the other matrix jobs | ||
|
||
steps: | ||
# Set up runner | ||
- name: β¬οΈ Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: β Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
- name: π Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
# Install dependencies and set up environment | ||
- name: π₯ Install Dependencies | ||
run: npm ci | ||
- name: π Load .env file (.env.${{matrix.setting}}) | ||
uses: xom9ikk/dotenv@v2 | ||
with: | ||
path: ./env | ||
mode: ${{matrix.setting}} | ||
|
||
# Build the app | ||
- name: β Run Build | ||
run: npm run build | ||
|
||
# Package the app installers | ||
- name: π¦ Package app installer - Windows | ||
if: startsWith(matrix.os, 'windows') | ||
run: npm run package:windows | ||
- name: π¦ Package app installer - Mac | ||
if: startsWith(matrix.os, 'mac') | ||
run: npm run package:mac | ||
- name: π¦ Package app installer - Linux | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: npm run package:linux | ||
|
||
# Upload installers to github release | ||
# TODO: Can these be combined based on matrix.os??? | ||
- name: Set package version and name | ||
uses: brown-ccv/gh-actions/get-package-info@main | ||
id: package_info | ||
- name: β¬ Upload installer to release - Windows | ||
if: startsWith(matrix.os, 'windows') | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: out/make/squirrel.windows/x64/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }} Setup.exe | ||
asset_name: ${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-${{ matrix.setting }}-setup.exe | ||
tag: ${{ github.ref }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: β¬ Upload installer to release - macOS | ||
if: startsWith(matrix.os, 'mac') | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: out/make/${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-x64.dmg | ||
asset_name: ${{ steps.package_info.outputs.package_name }}-${{ steps.package_info.outputs.package_version }}-${{ matrix.setting }}.dmg | ||
tag: ${{ github.ref }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: β¬ Upload installer to release - Linux | ||
if: startsWith(matrix.os, 'ubuntu') | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: out/make/deb/x64/${{ steps.package_info.outputs.package_name }}_${{ steps.package_info.outputs.package_version }}_amd64.deb | ||
asset_name: ${{ steps.package_info.outputs.package_name }}_${{ steps.package_info.outputs.package_version }}_${{ matrix.setting }}_amd64.deb | ||
tag: ${{ github.ref }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy-gh-pages: | ||
name: Deploy to GH Pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Set up runner | ||
- name: β¬οΈ Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: β Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
- name: π Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
# Install dependencies | ||
- name: π₯ Install Dependencies | ||
run: npm ci | ||
|
||
# Build the app | ||
- name: β Run Build | ||
run: npm run build | ||
|
||
# Deploy the app to GitHub Pages | ||
- name: π Deploy to GH Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build | ||
|
||
package-psiturk: | ||
name: Package for PsiTurk | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Set up Node | ||
- name: β¬οΈ Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: β Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
|
||
# Install dependencies | ||
- name: π₯ Install Dependencies | ||
run: npm ci | ||
|
||
# Build the app | ||
- name: β Run Build | ||
run: npm run build | ||
|
||
# Package on PsiTurk | ||
- name: Set package version and name | ||
uses: brown-ccv/gh-actions/get-package-info@main | ||
id: package_info | ||
- name: π Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: π₯ Install PsiTurk | ||
run: pip install psiturk | ||
- name: π¦ Create Psiturk Build | ||
run: | | ||
cd psiturkit | ||
./psiturk-it -p ${{ steps.package_info.outputs.package_name }}-psiturk | ||
- name: β¬ Upload PsiTurk Build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: psiturk-build | ||
path: psiturkit/${{ steps.package_info.outputs.package_name }}-psiturk |
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,17 @@ | ||
# Workflow dispatch for deleting unneeded artifacts. | ||
# Used to clear storage budget when testing release/package creation | ||
name: Delete Artifacts Workflow | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
days: | ||
description: Delete artifacts older than n days | ||
default: "5" | ||
|
||
jobs: | ||
delete-artifacts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: c-hive/gha-remove-artifacts@v1 | ||
with: | ||
age: ${{ format('{0} days', github.event.inputs.days) }} |
Oops, something went wrong.