Skip to content

Commit

Permalink
Merge pull request #1 from HarshPatel5940/hp/feat/add-gh-workflows
Browse files Browse the repository at this point in the history
Add Workflows and Templates
  • Loading branch information
HarshPatel5940 authored Dec 25, 2023
2 parents 6a66a06 + 87123ae commit 3517910
Show file tree
Hide file tree
Showing 8 changed files with 208 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ module.exports = {
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
};
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Bug Report'
description: Report a reproducible bug
labels: ['bug']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Do not forget to update the title above to consisely describe the issue.
- type: textarea
id: description
attributes:
label: Description
description: |
Please provide a clear and concise description of what the bug is. Include
screenshots if needed. Please test using the latest version of Raycast and API.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps To Reproduce
description: Your bug will get fixed much faster if we can easily reproduce it. Issues without reproduction steps may be immediately closed as not actionable.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
id: current-behaviour
attributes:
label: Current Behaviour
validations:
required: false
- type: textarea
id: expected-behaviour
attributes:
label: Expected Behaviour
validations:
required: false
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Feature Request'
description: Suggest a new UI approach or an improvement of an existing UI
labels: ['feature request']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
Do not forget to update the title above to consisely describe the issue.
- type: textarea
id: description
attributes:
label: Description
description: |
Please provide a clear and concise description of your idea. Consider adding code examples, screenshots, and references to similar APIs.
validations:
required: true
- type: textarea
id: audience
attributes:
label: Who will benefit from this feature?
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
35 changes: 35 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Chore (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

on:
push:
branches: ['master', 'main']
pull_request:
branches: ['master', 'main']
schedule:
- cron: '0 0 * * 1'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- 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:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build
49 changes: 49 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Lint

on:
push:
branches: ['master', 'main']
pull_request:
branches: ['master', 'main']
schedule:
- cron: '0 0 * * 1'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- 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:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: ESLint
run: pnpm run lint

- name: Prettier
run: pnpm format:check
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format": "prettier --write \"./src/**/*\"",
"format:check": "prettier --check \"./src/**/*\""
},
"dependencies": {
"@radix-ui/react-label": "^2.0.2",
Expand Down
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import './App.css';
import Navbar from '@/components/navbar';
import { Outlet } from 'react-router-dom';

function App() {
Expand Down

0 comments on commit 3517910

Please sign in to comment.