From 06ad0a77775a2fa345ac8fb37c43d030df09999d Mon Sep 17 00:00:00 2001 From: Jimmy Guzman <30631540+jimmy-guzman@users.noreply.github.com> Date: Sun, 2 Apr 2023 21:10:12 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20pull=20request=20ci/c?= =?UTF-8?q?d=20pipeline=20(#1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 1 + .github/actions/install/action.yml | 39 ++++++++++++++++++++++++++++++ .github/workflows/pull_request.yml | 22 +++++++++++++++++ .gitignore | 6 +++++ .prettierignore | 1 + .vscode/settings.json | 1 + README.md | 7 +++++- package.json | 2 +- 8 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 .github/actions/install/action.yml create mode 100644 .github/workflows/pull_request.yml diff --git a/.eslintignore b/.eslintignore index 386a661..47d908c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ dist pnmp-lock.yaml coverage playwright-report +vite.config.ts.*.mjs diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml new file mode 100644 index 0000000..66acae9 --- /dev/null +++ b/.github/actions/install/action.yml @@ -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 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..02bb6f5 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -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 diff --git a/.gitignore b/.gitignore index 5c0b875..ece3b24 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,9 @@ coverage /test-results/ /playwright-report/ /playwright/.cache/ + +# vite +vite.config.ts.*.mjs + +# turbo +.turbo diff --git a/.prettierignore b/.prettierignore index 1d56956..e0fe21c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,3 +2,4 @@ dist pnpm-lock.yaml coverage playwright-report +vite.config.ts.*.mjs diff --git a/.vscode/settings.json b/.vscode/settings.json index 75f3f0d..d2b7f8c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,7 @@ "daisyui", "noreferrer", "Parens", + "pnpm", "tailwindcss", "turborepo", "vite", diff --git a/README.md b/README.md index 27e564a..19c27bf 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 - + [vite]: https://vitejs.dev [react]: https://react.dev @@ -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 + + diff --git a/package.json b/package.json index 6955b44..49f4a57 100644 --- a/package.json +++ b/package.json @@ -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",