Skip to content

Commit

Permalink
ci: 👷 remove turbo and fix pnpm cache
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Apr 26, 2023
1 parent e9d4e4f commit 3cb14de
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 123 deletions.
25 changes: 14 additions & 11 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,29 @@ inputs:
runs:
using: composite
steps:
- name: 🏗 Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}

- name: 🏗 Setup pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ inputs.pnpm-version }}

- name: 🏗 Setup pnpm cache
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: pnpm
- name: 🏗 Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: 🏗 Setup turbo cache
- name: 🏗 Setup pnpm cache
uses: actions/cache@v3
with:
path: |
node_modules/.cache/turbo
.turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-turbo-
${{ runner.os }}-pnpm-store-
- name: 📦 Install deps
run: pnpm install
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on: [pull_request]
jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18']

steps:
- name: 🏗 Setup Repository
Expand All @@ -16,8 +13,20 @@ jobs:
- name: 📦 Install
uses: ./.github/actions/install
with:
node-version: ${{ matrix.node }}
node-version: 18
pnpm-version: 8.3.1

- name: 🦺 validate
run: pnpm validate
- name: 🚨 Lint
run: pnpm lint

- name: 🎨 Format
run: pnpm format

- name: 🏷️ Check Types
run: pnpm check-types

- name: ✅ Test
run: pnpm coverage

- name: 🧱 Build
run: pnpm build
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ coverage

# vite
vite.config.ts.*.mjs

# turbo
.turbo
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"Parens",
"pnpm",
"tailwindcss",
"turborepo",
"vite",
"vitest",
"zustand"
Expand Down
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
[![Playwright](https://img.shields.io/badge/Playwright-45ba4b?style=for-the-badge&logo=Playwright&logoColor=white)][Playwright]
[![eslint](https://img.shields.io/badge/eslint-3A33D1?style=for-the-badge&logo=eslint&logoColor=white)][eslint]
[![prettier](https://img.shields.io/badge/prettier-1A2C34?style=for-the-badge&logo=prettier&logoColor=F7BA3E)][prettier]
[![Turborepo](https://img.shields.io/badge/-Turborepo-EF4444?logo=turborepo&style=for-the-badge&logoColor=white)][turborepo]
[![pnpm](https://img.shields.io/badge/pnpm-%234a4a4a.svg?style=for-the-badge&logo=pnpm&logoColor=f69220)][pnpm]
[![Github Actions](https://img.shields.io/badge/GitHub_Actions-2088FF?style=for-the-badge&logo=github-actions&logoColor=white)][Github Actions]

Expand All @@ -33,7 +32,6 @@
- 🩺 [eslint][eslint] for static analysis, with:
- [eslint-config-jimmy-guzman](https://github.com/jimmy-guzman/eslint-config-jimmy-guzman) for opinionated guidelines
- 🎨 [prettier][prettier] for formatting
- ⚡️ [turborepo][turborepo] for high performant tasks
- ⚡️ [pnpm][pnpm] for fast and consistent installs
- 👷 [Github Actions][Github Actions] for easy workflow automation

Expand All @@ -59,30 +57,16 @@ First install dependencies with [pnpm](https://pnpm.io/installation), by running
pnpm install
```

Install [turborepo](https://turbo.build/repo/docs/installing#install-globally), by running the following command:

```
pnpm add turbo --global
```

Then to run the development server, run the following command:

```
pnpm dev
```

Or with turborepo:

```
turbo dev
```

Your application will be available at http://localhost:5173/ ❤️

## Available Tasks

**_Each of the following tasks can be ran with `turbo` instead of `pnpm`, which will be [cached](https://turbo.build/repo/docs/core-concepts/caching)_**

To build for production, run the following command:

```
Expand Down Expand Up @@ -155,7 +139,6 @@ If you need to do more, I recommend the following libraries:
[Testing Library]: https://testing-library.com/docs/guiding-principles
[Playwright]: https://playwright.dev
[prettier]: https://prettier.io
[turborepo]: https://turbo.build/repo
[pnpm]: https://pnpm.io
[Github Actions]: https://github.com/features/actions

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"format:fix": "prettier --write .",
"test": "vitest",
"coverage": "vitest run --coverage",
"e2e": "playwright test",
"validate": "turbo format lint coverage build"
"e2e": "playwright test"
},
"dependencies": {
"clsx": "1.2.1",
Expand Down Expand Up @@ -43,7 +42,6 @@
"prettier": "2.8.8",
"prettier-plugin-tailwindcss": "0.2.7",
"tailwindcss": "3.3.1",
"turbo": "1.9.3",
"typescript": "5.0.4",
"vite": "4.3.1",
"vitest": "0.30.1"
Expand Down
64 changes: 0 additions & 64 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions turbo.json

This file was deleted.

0 comments on commit 3cb14de

Please sign in to comment.