Skip to content

Commit

Permalink
Add Turborepo (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
domdomegg authored Jul 4, 2023
1 parent 0dcebd8 commit 00ff07d
Show file tree
Hide file tree
Showing 413 changed files with 7,773 additions and 7,901 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['@raise/eslint-config'],
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.github/ @domdomegg
55 changes: 55 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: ci

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
matrix:
node-version: [18]

steps:
- name: Checkout ${{ github.sha }}
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# TODO: can we further improve caching performance by caching node_modules directly,
# given our platform and node version is constant (changes are the usual reason not
# to as installs may vary on this)?
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Set up Turborepo caching
uses: dtinth/setup-github-actions-caching-for-turbo@v1
- name: Test, lint, build
run: npx turbo test lint build

# Deployment to dev environment
- name: "server: Retrieve env for dev environment"
if: github.ref == 'refs/heads/master'
run: echo "$DEV_ENV" > server/src/env/dev.ts
env:
DEV_ENV: ${{ secrets.DEV_ENV }}
- name: "Deploy to dev environment"
if: github.ref == 'refs/heads/master'
run: npx turbo deploy:dev
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# Deployment to prod environment
- name: "web: Deploy to prod environment"
if: github.ref == 'refs/heads/master'
run: npx turbo deploy:prod --filter web
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

71 changes: 0 additions & 71 deletions .github/workflows/server.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/shared.yaml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/web.yaml

This file was deleted.

27 changes: 24 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# tmp dir created in MWA website build
web-mwa/

# dependencies
node_modules

# build files
.turbo
.next
.cache
.npm
.eslintcache
.serverless
.webpack
.dynamodb
coverage
tmp

# build output
dist

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# tmp dir created in MWA website build
apps/web-mwa/
25 changes: 0 additions & 25 deletions .gitpod.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss"
"bradlc.vscode-tailwindcss",
"streetsidesoftware.code-spell-checker"
]
}
13 changes: 8 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
{
"editor.tabSize": 2,
// Standardize formatting to avoid noise in diffs
"files.encoding": "utf8",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,

// Tell ESLint to validate TS and TSX
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
],

// Encourages fixing lint issues as you go
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
},
"workbench.startupEditor": "none",
"git.enableSmartCommit": true,
"redhat.telemetry.enabled": false,
"css.format.enable": false,
"eslint.format.enable": true,

// Simplify git workflow
"git.enableSmartCommit": true,
}
Loading

0 comments on commit 00ff07d

Please sign in to comment.