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

Setup turborepo, with injected dependency syncing #145

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
33 changes: 0 additions & 33 deletions .github/actions/assert-build/action.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/actions/download-built-package/action.yml

This file was deleted.

88 changes: 45 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,46 @@ concurrency:
env:
CI: true
dist: ember-headless-table/dist
TURBO_API: http://127.0.0.1:9080
TURBO_TOKEN: foo-123
TURBO_TEAM: foo

jobs:
install_dependencies:
name: Install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm





lint:
name: Lint
runs-on: ubuntu-latest
needs: [install_dependencies]
steps:
- uses: actions/checkout@v3
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- name: Lint
run: pnpm lint



build:
name: Build Tests
needs: [install_dependencies]
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/assert-build


typecheck:
name: '${{ matrix.typescript-scenario }}'
runs-on: ubuntu-latest
timeout-minutes: 2
needs: [build]
needs: [install_dependencies]
continue-on-error: true
strategy:
fail-fast: true
Expand All @@ -67,17 +67,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- name: 'Change TS to ${{ matrix.typescript-scenario }}'
run: 'pnpm add --save-dev ${{ matrix.typescript-scenario}}'
working-directory: ./test-app
- name: 'Type checking'

run: |
pnpm --filter test-app exec tsc -v;
pnpm --filter test-app exec glint --version;
pnpm --filter test-app exec glint;
run: pnpm turbo typecheck



Expand All @@ -87,24 +86,30 @@ jobs:
name: Default Tests
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [build]
needs: [install_dependencies]
steps:
- uses: actions/checkout@v3
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- run: pnpm --filter test-app test:ember

floating_tests:
name: Floating Deps Test
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [build]
needs: [install_dependencies]
steps:
- uses: actions/checkout@v3
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- name: Install Dependencies (without lockfile)
run: rm pnpm-lock.yaml && pnpm install
- uses: ./.github/actions/download-built-package
- run: pnpm --filter test-app test:ember


Expand Down Expand Up @@ -133,8 +138,11 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- name: Run Tests
working-directory: ./test-app
run: |
Expand Down Expand Up @@ -166,8 +174,11 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand All @@ -180,25 +191,10 @@ jobs:



TypecheckDocs:
name: Typecheck Docs
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- run: pnpm glint
working-directory: docs-app



PublishDocstoCloudflarePages:
name: Publish Docs to Cloudflare Pages
runs-on: ubuntu-latest
needs: build
needs: install_dependencies
permissions:
contents: read
deployments: write
Expand All @@ -209,8 +205,11 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- run: pnpm build:docs
- name: Publish to Cloudflare Pages
id: publishStep
Expand All @@ -232,8 +231,11 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- uses: marocchino/sticky-pull-request-comment@v2
with:
message: |+
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dist/
node_modules/

# misc
.turbo/
/.env*
/.pnp*
/.sass-cache
Expand Down
69 changes: 0 additions & 69 deletions ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "pnpm docs:watch",
"start": "pnpm docs:watch --preserveWatchOutput",
"docs:build": "typedoc --options ./typedoc.config.json",
"docs:watch": "typedoc --options ./typedoc.config.json --watch"
},
Expand Down
1 change: 1 addition & 0 deletions docs-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# compiled output
/dist/
/tmp/
public/api/*

# dependencies
/bower_components/
Expand Down
10 changes: 7 additions & 3 deletions docs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@
"test": "tests"
},
"scripts": {
"build": "ember build --environment=production",
"build": "cp ../docs-api/dist/ ./public/api -r && ember build --environment=production",
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:' --prefix-colors cyan,white,yellow",
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:' --prefix-colors cyan,white,yellow",
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
"lint:js": "eslint . --cache",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test:ember": "ember test"
"lint:types": "glint",
"start": "ember serve -p 0",
"typecheck": "pnpm tsc -v; pnpm glint --version; pnpm lint:types",
"test:ember": "ember test",
"_syncPnpm": "pnpm sync"
},
"devDependencies": {
"docs-api": "workspace:*",
"@babel/core": "^7.20.12",
"@crowdstrike/ember-toucan-styles": "^1.0.5",
"@crowdstrike/tailwind-toucan-base": "^3.3.1",
Expand Down
2 changes: 1 addition & 1 deletion ember-headless-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"lint:js": "eslint . --cache",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js:fix": "eslint . --fix",
"start": "rollup --config --watch",
"start": "rollup --config --watch --no-watch.clearScreen",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"prepack": "rollup --config"
},
Expand Down
Loading