Skip to content

Commit

Permalink
chore: speed-up ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Joabesv committed Oct 17, 2023
1 parent d05ba8f commit 797e490
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,29 @@ on:

jobs:
install-and-build:
name: Cache install time
timeout-minutes: 15
runs-on: ubuntu-latest
# To use Remote Caching, uncomment the next lines and follow the steps below.
# env:
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# TURBO_TEAM: ${{ vars.TURBO_TEAM }}
name: 📦 Install node modules
runs-on: [ubuntu-latest]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- name: Check out code
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install pnpm
uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: 20
node-version: 20.x
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
Expand All @@ -47,9 +40,11 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
- name: 📦 Install dependencies
run: pnpm i
- name: Build

- name: 🛠 Build
run: pnpm build
- name: Type Check

- name: 💼 Type Check
run: pnpm build:type-check
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"populate": "turbo run populate -- ",
"dev": "turbo run dev",
"dev": "turbo run dev --parallel",
"build": "turbo run build",
"build:type-check": "turbo run build:type-check",
"start": "turbo run start",
Expand Down

0 comments on commit 797e490

Please sign in to comment.