Skip to content

Commit

Permalink
Streamline turbo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Feb 20, 2023
1 parent b339b0c commit 1e61c65
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 29 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ concurrency:

env:
CI: true
dist: packages/ember-headless-form/dist
TURBO_API: http://127.0.0.1:9080
TURBO_TOKEN: foo-123
TURBO_TEAM: foo

jobs:
install_dependencies:
Expand All @@ -25,7 +27,6 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
- uses: ./.github/actions/pnpm

lint:
Expand All @@ -39,7 +40,6 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
- uses: ./.github/actions/pnpm
- name: Lint + Format + Glint
run: pnpm lint
Expand All @@ -64,13 +64,12 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
- uses: ./.github/actions/pnpm
- name: 'Change TS to ${{ matrix.typescript-scenario }}'
run: 'pnpm add --save-dev ${{ matrix.typescript-scenario}}'
working-directory: ./test-app
- name: 'Type checking'
run: pnpm _turbo typecheck
run: pnpm turbo typecheck

default_tests:
name: Default Tests
Expand All @@ -84,7 +83,6 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
- uses: ./.github/actions/pnpm
- run: pnpm test

Expand All @@ -100,7 +98,6 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
- uses: ./.github/actions/pnpm
- name: Install Dependencies (without lockfile)
run: rm pnpm-lock.yaml && pnpm install
Expand Down Expand Up @@ -131,17 +128,10 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
- uses: ./.github/actions/pnpm
- name: Run Tests
working-directory: ./test-app
# This command doesn't actually run the bash command, but
# instead falls back to ember test...
# run: >-
# node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
# --skip-cleanup --- bash -c "cd ../ && pnpm test"
# same as the above, but without the sub-shell
run: node_modules/.bin/ember try:one ${{matrix.try-scenario}} --skip-cleanup --- pnpm turbo --api='http://127.0.0.1:9080' --token=foo-123 --team=foo test
run: node_modules/.bin/ember try:one ${{matrix.try-scenario}} --skip-cleanup --- pnpm turbo test

# https://github.com/changesets/action
release:
Expand All @@ -163,7 +153,6 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: foo-123
- uses: ./.github/actions/pnpm
- run: pnpm build
- name: Create Release Pull Request or Publish to npm
Expand All @@ -180,7 +169,8 @@ jobs:
publishDocs:
name: Publish Docs to Cloudflare Pages
runs-on: ubuntu-latest
# needs: build
needs:
- install_dependencies
permissions:
contents: read
deployments: write
Expand All @@ -190,9 +180,7 @@ jobs:
with:
persist-credentials: false
- uses: ./.github/actions/pnpm
- run: pnpm build && pnpm i -f
# - uses: ./.github/actions/download-built-package
- run: pnpm build:docs-app
- run: pnpm build:docs
- name: Publish to Cloudflare Pages
id: publishStep
uses: cloudflare/pages-action@1
Expand All @@ -208,4 +196,4 @@ jobs:
## Preview URLs
Env: ${{ steps.publishStep.outputs.environment }}
Docs: ${{ steps.publishStep.outputs.url }}
# # api docs: ${{ steps.publishStep.outputs.url }}/api/modules.html
# # api docs: ${{ steps.publishStep.outputs.url }}/api/modules.html
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"author": "CrowdStrike UX Team",
"scripts": {
"release": "changeset publish",
"build:docs": "pnpm _turbo build --filter docs-app",
"build:docs": "pnpm turbo build --filter docs-app",
"start": "pnpm start:tests",
"start:docs": "pnpm _turbo --filter docs-app start",
"start:tests": "pnpm _turbo --filter test-app start",
"start:docs": "pnpm turbo --filter docs-app start",
"start:tests": "pnpm turbo --filter test-app start",
"start:addon": "pnpm --filter !test-app start --no-watch.clearScreen",
"build": "pnpm _turbo build",
"test": "pnpm _turbo test",
"lint": "pnpm _turbo lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"_turbo": "pnpm turbo --api='http://127.0.0.1:9080' --token=foo-123 --team=foo"
"build": "pnpm turbo build",
"test": "pnpm turbo --filter test-app test",
"test:docs": "pnpm turbo --filter docs-app test",
"lint": "pnpm turbo lint",
"lint:fix": "pnpm --filter '*' lint:fix"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
Expand Down

0 comments on commit 1e61c65

Please sign in to comment.