Skip to content

Commit bf75d8e

Browse files
authored
Merge pull request #233 from akd-io/feature/174-set-up-turborepo
Set up turborepo
2 parents ba88315 + ee7acf4 commit bf75d8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2561
-5209
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on: [pull_request]
44

55
jobs:
66
build:
7-
name: "Check formatting"
7+
name: "CI"
88

99
runs-on: ubuntu-latest
1010

11+
env:
12+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
13+
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
14+
1115
steps:
1216
- name: "Checkout repo"
1317
uses: actions/checkout@v3
@@ -27,4 +31,13 @@ jobs:
2731
run: pnpm install
2832

2933
- name: "Check formatting"
30-
run: pnpm format:check
34+
run: npx turbo format:check
35+
36+
- name: "Build"
37+
run: pnpm build
38+
39+
- name: "Lint"
40+
run: pnpm lint
41+
42+
- name: "Test"
43+
run: pnpm test
Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [pull_request]
44

55
jobs:
66
get-test-files:
7-
name: "Gets all e2e Jest test files for use in a later job"
7+
name: "Get e2e test files"
88

99
runs-on: ubuntu-latest
1010

@@ -20,16 +20,21 @@ jobs:
2020
with:
2121
version: 8
2222

23-
- name: "Set up Node 18"
23+
- name: "Set up latest Node LTS"
2424
uses: actions/setup-node@v3
2525
with:
26-
node-version: 18
26+
node-version: "lts/*"
2727
cache: pnpm
2828

2929
- name: "Install dependencies"
3030
run: pnpm install
3131

32-
- name: "Get test files"
32+
# Build is necessary, as the `get-e2e-test-files-array` script returns built files
33+
- name: "Build"
34+
working-directory: packages/create-next-stack
35+
run: npx turbo build
36+
37+
- name: "Set test files"
3338
id: set-test-files
3439
working-directory: packages/create-next-stack
3540
run: |
@@ -42,12 +47,15 @@ jobs:
4247

4348
strategy:
4449
matrix:
45-
node: ["18"]
4650
os: [ubuntu-latest, windows-latest, macOS-latest]
4751
test-file: ${{ fromJSON(needs.get-test-files.outputs.test-files) }}
4852

4953
runs-on: ${{ matrix.os }}
5054

55+
env:
56+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
57+
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
58+
5159
steps:
5260
- name: "Checkout repo"
5361
uses: actions/checkout@v3
@@ -57,21 +65,19 @@ jobs:
5765
with:
5866
version: 8
5967

60-
- name: "Set up Node ${{ matrix.node }}"
68+
- name: "Set up latest Node LTS"
6169
uses: actions/setup-node@v3
6270
with:
63-
node-version: ${{ matrix.node }}
71+
node-version: "lts/*"
6472
cache: pnpm
6573

6674
- name: "Install dependencies"
6775
run: pnpm install
6876

6977
- name: "Build"
70-
run: pnpm build:cli
71-
72-
- name: "Lint"
73-
run: pnpm lint:cli
78+
working-directory: packages/create-next-stack
79+
run: npx turbo build
7480

75-
- name: "Test"
81+
- name: "Run e2e test: ${{ matrix.test-file.fileName }}"
7682
working-directory: packages/create-next-stack
77-
run: pnpm jest-e2e:ci ${{ matrix.test-file.filePath }}
83+
run: pnpm e2e:single:ci ${{ matrix.test-file.filePath }}

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414
name: Publish
1515
runs-on: ubuntu-latest
1616

17+
env:
18+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
19+
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
20+
1721
steps:
1822
- name: "Checkout repo"
1923
uses: actions/checkout@v3
@@ -34,6 +38,6 @@ jobs:
3438
run: pnpm install
3539

3640
- name: "Publish packages"
37-
run: pnpm publish -r
41+
run: pnpm publish --filter="./packages/**"
3842
env:
3943
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.github/workflows/web-ci.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,6 @@
5858
.history
5959
.ionide
6060

61-
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
61+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
62+
63+
.turbo

.prettierignore

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
# Prettier
1+
# These are extensions to .gitignore.
2+
# .gitignore is used alongside .prettierignore using both `--ignore-path=.prettierignore` and `--ignore-path=.gitignore` at the same time.
23
**/prod-assets
4+
pnpm-lock.yaml
35

4-
##############################################
5-
### REST SHOULD BE IDENTICAL TO .gitignore ###
6-
##############################################
6+
#######################################################################################
7+
### REST SHOULD BE IDENTICAL TO .gitignore ###
8+
### TODO: Fix this when https://github.com/prettier/prettier/pull/14332 is released ###
9+
#######################################################################################
10+
11+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
712

813
# dependencies
914
**/node_modules
@@ -63,4 +68,6 @@
6368
.history
6469
.ionide
6570

66-
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
71+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
72+
73+
.turbo

CONTRIBUTING.md

Lines changed: 38 additions & 32 deletions
File renamed without changes.

0 commit comments

Comments
 (0)