Skip to content

Commit 43ff62f

Browse files
committed
(chore) Update CI to leverage turbo
1 parent 2aaf046 commit 43ff62f

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- name: ⬇️ Checkout repo
1717
uses: actions/checkout@v2
18-
- uses: pnpm/action-setup@v2.0.1
18+
- uses: pnpm/action-setup@v2
1919
with:
2020
version: 7.0.0
2121
- name: Use Node.js ${{ matrix.node-version }}
@@ -27,22 +27,22 @@ jobs:
2727
- name: 📀 Install dependencies
2828
run: pnpm install
2929

30-
- name: 🧹 Lint
31-
run: pnpm run lint
32-
33-
- name: 😍 Prettier check
34-
run: pnpm run check
30+
- name: Setup a local cache server for Turborepo
31+
uses: felixmosh/turborepo-gh-artifacts@v2
32+
with:
33+
repo-token: ${{ secrets.GITHUB_TOKEN }}
34+
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
3535

36-
- name: 🧪 Test
37-
run: pnpm run coverage
36+
- name: 🧹 Lint and Test
37+
run: pnpm turbo lint check coverage --color ---api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}"
3838

3939
- name: ⏫ Upload coverage
4040
uses: coverallsapp/github-action@master
4141
with:
4242
github-token: ${{ secrets.GITHUB_TOKEN }}
4343

4444
- name: 👷‍♀️ Build
45-
run: pnpm run build
45+
run: pnpm turbo build --color --concurrency=5 --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}"
4646

4747
- name: ⏫ Upload build artifacts
4848
uses: actions/upload-artifact@v2

turbo.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44
"build": {
55
"outputs": ["build/**"]
66
},
7+
"check": {
8+
"outputs": []
9+
},
710
"lint": {
811
"outputs": []
912
},
13+
"coverage": {
14+
"dependsOn": [],
15+
"outputs": []
16+
},
1017
"test": {
1118
"dependsOn": [],
1219
"outputs": []

0 commit comments

Comments
 (0)