Skip to content

Commit

Permalink
Add npm workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
chvmvd committed Feb 27, 2024
1 parent 1fffd32 commit 556abd6
Show file tree
Hide file tree
Showing 26 changed files with 11,347 additions and 20,357 deletions.
201 changes: 12 additions & 189 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
pull_request:

jobs:
build-website:
name: Build Website
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand All @@ -19,49 +19,20 @@ jobs:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Node Packages
run: npm ci
working-directory: website
shell: bash

- name: Build
run: npm run build
working-directory: website
shell: bash

build-learn:
name: Build Learn
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Node Packages
run: npm ci
working-directory: learn
run: npm run build:packages
shell: bash

- name: Build
run: npm run build
working-directory: learn
shell: bash

build-translate:
name: Build Translate
type-check:
name: Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand All @@ -73,70 +44,20 @@ jobs:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Node Packages
run: npm ci
working-directory: translate
shell: bash

- name: Build
run: npm run build
working-directory: translate
shell: bash

build-braille-package:
name: Build Braille Package
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: npm

- name: Install Node Packages
run: npm run ci:packages
shell: bash

- name: Build
run: npm run build:packages
shell: bash

type-check-website:
name: Type Check Website
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Node Packages
run: npm ci
working-directory: website
run: npm run build:packages
shell: bash

- name: Type Check
run: npm run type-check
working-directory: website
shell: bash

type-check-learn:
name: Type Check Learn
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand All @@ -148,95 +69,20 @@ jobs:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Node Packages
run: npm ci
working-directory: learn
shell: bash

- name: Type Check
run: npm run type-check
working-directory: learn
shell: bash

type-check-translate:
name: Type Check Translate
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Node Packages
run: npm ci
working-directory: translate
shell: bash

- name: Type Check
run: npm run type-check
working-directory: translate
shell: bash

type-check-braille-package:
name: Type Check Braille Package
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: npm

- name: Install Node Packages
run: npm ci
working-directory: packages/braille
shell: bash

- name: Type Check
run: npm run type-check
working-directory: packages/braille
shell: bash

test-braille-package:
name: Test Braille Package
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: npm

- name: Install Node Packages
run: npm ci
working-directory: packages/braille
run: npm run build:packages
shell: bash

- name: Test
run: npm test
working-directory: packages/braille
shell: bash

eslint-website:
name: ESLint Website
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand All @@ -250,35 +96,12 @@ jobs:

- name: Install Node Packages
run: npm ci
working-directory: website
shell: bash

- name: Run ESLint
run: npm run lint:check
working-directory: website

eslint-learn:
name: ESLint Learn
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: npm

- name: Install Node Packages
run: npm ci
working-directory: learn
run: npm run lint
shell: bash

- name: Run ESLint
run: npx eslint --max-warnings 0 .
working-directory: learn

prettier:
name: Prettier
runs-on: ubuntu-latest
Expand Down
30 changes: 12 additions & 18 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@ jobs:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Packages
run: npm ci
working-directory: website
shell: bash

- name: Build Packages
run: npm run build:packages
shell: bash

- name: Build
run: npm run build
working-directory: website
shell: bash

- name: Upload Artifact
Expand Down Expand Up @@ -80,18 +78,16 @@ jobs:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Packages
run: npm ci
working-directory: learn
shell: bash

- name: Build Packages
run: npm run build:packages
shell: bash

- name: Build
run: npm run build
working-directory: learn
shell: bash

- name: Upload Artifact
Expand Down Expand Up @@ -138,18 +134,16 @@ jobs:
node-version: latest
cache: npm

- name: Build Packages
run: npm run ci:packages && npm run build:packages
shell: bash

- name: Install Packages
run: npm ci
working-directory: translate
shell: bash

- name: Build Packages
run: npm run build:packages
shell: bash

- name: Build
run: npm run build
working-directory: translate
shell: bash
env:
VITE_API_ENDPOINT: "https://dot-tutor-backend.onrender.com"
Expand Down
Loading

0 comments on commit 556abd6

Please sign in to comment.