Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add npm workspaces #184

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading