Skip to content

Commit

Permalink
chore: configure turbo (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrunton authored Aug 25, 2024
1 parent e2413f1 commit 98dac0a
Show file tree
Hide file tree
Showing 13 changed files with 15,110 additions and 19,339 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["client", "services/api", "pulumi"]
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
Expand All @@ -20,16 +14,22 @@ jobs:

test:
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["services/api", "pulumi", "client"]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run test

pulumi:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.directory }}
working-directory: pulumi
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm install --ignore-workspace
- run: pnpm run lint
- run: pnpm run test

e2e-test:
Expand All @@ -50,7 +50,7 @@ jobs:
- run: pnpm run test:e2e

playwright:
needs: [lint, test, e2e-test]
needs: [lint, test, e2e-test, pulumi]
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -62,23 +62,18 @@ jobs:
with:
node-version: 18
- name: Install dependencies
run: pnpm install
run: pnpm install --ignore-workspace
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- uses: rrainn/[email protected]
with:
port: 8000
- name: Start API
working-directory: services/api
run: |
pnpm install
pnpm run db:init
pnpm run start:dev &
- name: Start Client
working-directory: client
- name: Start services
run: |
pnpm install
pnpm run --filter api db:init
pnpm run dev &
working-directory: .
env:
VITE_API_URL: http://localhost:3000
- name: Configure environment
Expand Down Expand Up @@ -114,14 +109,11 @@ jobs:
if: github.ref == 'refs/heads/main'
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
defaults:
run:
working-directory: services/api
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run test:mutate
- run: pnpm --filter api install
- run: pnpm --filter api run test:mutate

build-api:
needs: [playwright]
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ jobs:
env:
VITE_API_URL: https://chat-demo-api-${{ github.head_ref || github.ref_name }}.dev.jbrunton-aws.com
run: |
pnpm install
pnpm run build
working-directory: client
- run: pnpm install
pnpm --filter client install
pnpm --filter client run build
- run: pnpm install --ignore-workspace
working-directory: pulumi
- uses: pulumi/actions@v3
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: "services/api"
steps:
- uses: pnpm/action-setup@v4
- uses: actions/checkout@v4
- run: pnpm install
- run: pnpm run docs:generate
- run: pnpm --filter api install
- run: pnpm --filter api run docs:generate
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/docker/
.turbo/
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"jsdom": "22.1.0",
"msw": "1.2.3",
"msw": "1.3.2",
"prettier": "2.8.1",
"typescript": "^4.9.3",
"vite": "^4.0.0",
Expand Down
Loading

0 comments on commit 98dac0a

Please sign in to comment.