Skip to content

Commit

Permalink
feat: refactor into monorepo (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala authored Jun 9, 2022
1 parent d65223f commit 1f99506
Show file tree
Hide file tree
Showing 102 changed files with 10,603 additions and 2,964 deletions.
58 changes: 21 additions & 37 deletions .github/workflows/ci.yml → .github/workflows/authority.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: CI
name: authority

on:
push:
branches:
- main
paths:
- "src/**"
- "packages/interface/**"
- "packages/authority/**"
pull_request:
branches:
- main
paths:
- "src**"
- ".github/workflows/ci.yml"
workflow_dispatch:

- "packages/interface/**"
- ".github/workflows/interface.yml"
jobs:
check:
name: Typecheck
Expand All @@ -22,9 +21,10 @@ jobs:
matrix:
node-version:
- 16
project:
- authority
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v2
Expand All @@ -37,21 +37,25 @@ jobs:
- name: Typecheck
uses: gozala/[email protected]
with:
project: ./tsconfig.json
test-node:
name: Test Node
project: packages/${{matrix.project}}/tsconfig.json
test:
name: Test
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version:
- 14
- 16
os:
- ubuntu-latest
- windows-latest
- macos-latest
project:
- authority

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
Expand All @@ -61,28 +65,8 @@ jobs:
- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Test
run: yarn test:node
test-web:
name: Test Web
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- 16

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Test (Node)
run: yarn --cwd packages/${{matrix.project}} test:node

- name: Test
run: yarn test:web
- name: Test (Web)
run: yarn --cwd packages/${{matrix.project}} test:web
77 changes: 77 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: client

on:
push:
branches:
- main
paths:
- "packages/interface/**"
- "packages/core/**"
- "packages/transport/**
- "packages/client/**"
pull_request:
branches:
- main
paths:
- "packages/interface/**"
- "packages/core/**"
- "packages/transport/**
- "packages/client/**"
- ".github/workflows/client.yml"
jobs:
check:
name: Typecheck
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16
project:
- client
steps:
- uses: actions/checkout@v2

- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Typecheck
uses: gozala/[email protected]
with:
project: packages/${{matrix.project}}/tsconfig.json
test:
name: Test
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version:
- 14
- 16
os:
- ubuntu-latest
- windows-latest
- macos-latest
project:
- client

steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Test (Node)
run: yarn --cwd packages/${{matrix.project}} test:node

- name: Test (Web)
run: yarn --cwd packages/${{matrix.project}} test:web
73 changes: 73 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: core

on:
push:
branches:
- main
paths:
- "packages/core/**"
- "packages/interface/**"
pull_request:
branches:
- main
paths:
- "packages/core/**"
- "packages/interface/**"
- ".github/workflows/core.yml"
jobs:
check:
name: Typecheck
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16
project:
- core
steps:
- uses: actions/checkout@v2

- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Typecheck
uses: gozala/[email protected]
with:
project: packages/${{matrix.project}}/tsconfig.json
test:
name: Test
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version:
- 14
- 16
os:
- ubuntu-latest
- windows-latest
- macos-latest
project:
- core

steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Test (Node)
run: yarn --cwd packages/${{matrix.project}} test:node

- name: Test (Web)
run: yarn --cwd packages/${{matrix.project}} test:web
39 changes: 39 additions & 0 deletions .github/workflows/interface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: interface

on:
push:
branches:
- main
paths:
- "packages/interface/**"
pull_request:
branches:
- main
paths:
- "packages/interface/**"
- ".github/workflows/core.yml"
jobs:
check:
name: Typecheck
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16
project:
- interface
steps:
- uses: actions/checkout@v2

- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Typecheck
uses: gozala/[email protected]
with:
project: packages/${{matrix.project}}/tsconfig.json
76 changes: 76 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: server

on:
push:
branches:
- main
paths:
- "packages/interface/**"
- "packages/core/**"
- "packages/transport/**
- "packages/client/**"
- "packages/server/**"
pull_request:
branches:
- main
paths:
- "packages/interface/**"
- "packages/core/**"
- "packages/transport/**
- "packages/client/**"
- "packages/server/**"
- ".github/workflows/server.yml"
jobs:
check:
name: Typecheck
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16
project:
- server
steps:
- uses: actions/checkout@v2

- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Typecheck
uses: gozala/[email protected]
with:
project: packages/${{matrix.project}}/tsconfig.json
test:
name: Test
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version:
- 14
- 16
os:
- ubuntu-latest
- windows-latest
- macos-latest
project:
- server

steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Test (Node)
run: yarn --cwd packages/${{matrix.project}} test:node
Loading

0 comments on commit 1f99506

Please sign in to comment.