From 58abf5d77269ca886265f16be2d1939865e39c66 Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Thu, 27 Oct 2022 21:35:19 +0300 Subject: [PATCH] (chore) Update CI to leverage turbo --- .github/workflows/ci.yml | 18 +++++++++--------- turbo.json | 7 +++++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52ccd99..ea92adf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: steps: - name: โฌ‡๏ธ Checkout repo uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: version: 7.0.0 - name: Use Node.js ${{ matrix.node-version }} @@ -27,14 +27,14 @@ jobs: - name: ๐Ÿ“€ Install dependencies run: pnpm install - - name: ๐Ÿงน Lint - run: pnpm run lint - - - name: ๐Ÿ˜ Prettier check - run: pnpm run check + - name: Setup a local cache server for Turborepo + uses: felixmosh/turborepo-gh-artifacts@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + server-token: ${{ secrets.TURBO_SERVER_TOKEN }} - - name: ๐Ÿงช Test - run: pnpm run coverage + - name: ๐Ÿงน Lint and Test + run: pnpm turbo lint check coverage --color --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}" - name: โซ Upload coverage uses: coverallsapp/github-action@master @@ -42,7 +42,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿ‘ทโ€โ™€๏ธ Build - run: pnpm run build + run: pnpm turbo build --color --concurrency=5 --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}" - name: โซ Upload build artifacts uses: actions/upload-artifact@v2 diff --git a/turbo.json b/turbo.json index 66d9e33..249bb2c 100644 --- a/turbo.json +++ b/turbo.json @@ -4,9 +4,16 @@ "build": { "outputs": ["build/**"] }, + "check": { + "outputs": [] + }, "lint": { "outputs": [] }, + "coverage": { + "dependsOn": [], + "outputs": [] + }, "test": { "dependsOn": [], "outputs": []