Skip to content

Commit

Permalink
feat: ✨ add pull request ci/cd pipeline (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman authored Apr 3, 2023
1 parent 612c01b commit 06ad0a7
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist
pnmp-lock.yaml
coverage
playwright-report
vite.config.ts.*.mjs
39 changes: 39 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Install
description: Install everything for the repo

inputs:
node-version:
description: Version of Node to use
default: 18.x

pnpm-version:
description: Version of pnpm to use
default: 7.x

runs:
using: composite
steps:
- 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: 🏗 Setup turbo cache
uses: actions/cache@v3
with:
path: |
node_modules/.cache/turbo
.turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: 📦 Install deps
run: pnpm install
shell: bash
22 changes: 22 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: pull_request

on: [pull_request]

jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18']

steps:
- name: 🏗 Setup Repository
uses: actions/checkout@v3

- name: 📦 Install
uses: ./.github/actions/install
with:
node-version: ${{ matrix.node }}

- name: 🦺 validate
run: pnpm validate
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ coverage
/test-results/
/playwright-report/
/playwright/.cache/

# vite
vite.config.ts.*.mjs

# turbo
.turbo
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist
pnpm-lock.yaml
coverage
playwright-report
vite.config.ts.*.mjs
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"daisyui",
"noreferrer",
"Parens",
"pnpm",
"tailwindcss",
"turborepo",
"vite",
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
[![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]

- ⚡️ [vite][vite] for fast server start and HMR, with:
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) for a even faster dev Server
Expand All @@ -34,6 +35,7 @@
- 🎨 [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

## Getting Started

Expand Down Expand Up @@ -134,7 +136,7 @@ If you need to do more, I recommend the following libraries:
- [TanStack Table (React Table)](https://tanstack.com/table/v8) for when you need to build complex **tables** or **data grids**
- [fathom](https://usefathom.com/) for **analytics** which is easy to use

<!-- features links -->
<!-- features references start -->

[vite]: https://vitejs.dev
[react]: https://react.dev
Expand All @@ -147,3 +149,6 @@ If you need to do more, I recommend the following libraries:
[prettier]: https://prettier.io
[turborepo]: https://turbo.build/repo
[pnpm]: https://pnpm.io
[Github Actions]: https://github.com/features/actions

<!-- features references end -->
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test": "vitest",
"coverage": "vitest run --coverage",
"e2e": "playwright test",
"validate": "turbo format lint coverage e2e build"
"validate": "turbo format lint coverage build"
},
"dependencies": {
"clsx": "1.2.1",
Expand Down

0 comments on commit 06ad0a7

Please sign in to comment.