Your favorite shift management application!
chore: gh workflow (#54)
panteL277928c9f28a
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymlnew file mode 100644index 0000000..85748c4--- /dev/null+++ b/.github/ISSUE_TEMPLATE/bug_report.yml@@ -0,0 +1,95 @@+name: Bug report+description: Report a bug you encountered+title: "bug: "+labels:+ - bug+projects:+ - panteLx/4+body:+ - type: dropdown+ id: "deployment"+ attributes:+ label: Deployment Method+ description: How are you hosting the app?+ options:+ - Docker+ - Node+ - Other, specify at description+ validations:+ required: true+ - type: input+ id: "version"+ attributes:+ label: App Version+ description: What version of the app are you using, or what was the commit that your deployment was built off of?+ placeholder: v1.0.0+ validations:+ required: true+ - type: dropdown+ id: "bugArea"+ attributes:+ label: Bug Area+ description: Select what area of the app this issue affects+ options:+ - Deploying+ - Configuring+ - Using Features+ - UI/UX+ - Other, specify at description+ validations:+ required: true+ - type: input+ id: "deviceInfo"+ attributes:+ label: Device/Browser/OS/Platform Version+ description: Details about the device this issue occurs on. Leave blank if not applicable (e.g. error within app logic).+ placeholder: Google Chrome 120 on Windows 11+ - type: textarea+ id: "bugDescription"+ attributes:+ label: Bug Description / Steps to Reproduce+ description: Precisely describe the bug you encountered and the steps to reproduce it. Avoid vague descriptions. Include relevant details.+ validations:+ required: true+ - type: textarea+ id: "expectedBehaviour"+ attributes:+ label: Expected Behavior+ description: Describe what you expected to happen.+ validations:+ required: true+ - type: textarea+ id: "screenshots"+ attributes:+ label: Screenshots+ description: If applicable, add screenshots of the bug and your configuration.+ - type: checkboxes+ id: "debuggingChecklist"+ attributes:+ label: Debugging Checklist+ description: Confirm you have included at least some of the following debugging information. If you haven't, please do so before submitting the issue.+ options:+ - label: >-+ If applicable, I have included debug logs+ required: false+ - type: checkboxes+ id: "issueChecklist"+ attributes:+ label: Issue Checklist+ description: Confirm that you have understood and followed these requirements+ options:+ - label: >-+ I have written a short but informative title that clearly describes the issue.+ required: true+ - label: >-+ I have given clear and descriptive steps to reproduce the issue.+ required: true+ - label: >-+ I have checked open and closed issues and confirmed that this is not a duplicate of another issue.+ required: true+ - label: >-+ I have filled out all of the requested information adequately.+ required: true+ - label: >-+ I am using the [latest version](https://github.com/pantelx/bettershift/releases/latest).+ required: truediff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymlnew file mode 100644index 0000000..3ba13e0--- /dev/null+++ b/.github/ISSUE_TEMPLATE/config.yml@@ -0,0 +1 @@+blank_issues_enabled: falsediff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.ymlnew file mode 100644index 0000000..fdb0459--- /dev/null+++ b/.github/ISSUE_TEMPLATE/feature_request.yml@@ -0,0 +1,41 @@+name: Feature Request+description: Suggest an idea for the project+title: "feature request: "+labels:+ - feature request+projects:+ - panteLx/4+body:+ - type: checkboxes+ id: "1"+ attributes:+ label: Checklist+ description: >-+ Please check the following before submitting a feature request. If you+ are unable to check all the boxes, please provide more information in the+ description.+ options:+ - label: >-+ I checked that this feature has not been requested before+ required: true+ - label: >-+ I checked that this feature is not in the "wontfix / not planned" list+ required: true+ - label: >-+ This feature will benefit the majority of users+ - type: textarea+ id: "2"+ attributes:+ label: Problem Description / Use Case+ description: >-+ Provide a detailed description of the problem you are facing or the use case you have in mind.+ validations:+ required: true+ - type: textarea+ id: "3"+ attributes:+ label: Proposed Solution+ description: >-+ Provide a detailed description of the solution you'd like to see. If you have any ideas on how to implement the feature, please include them here.+ validations:+ required: truediff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.ymlnew file mode 100644index 0000000..24f3153--- /dev/null+++ b/.github/workflows/pr-checks.yml@@ -0,0 +1,34 @@+name: PR Checks++on:+ pull_request:+ types: [opened, synchronize, reopened]++jobs:+ test:+ name: Tests & Checks+ runs-on: ubuntu-latest++ steps:+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Setup Node.js+ uses: actions/setup-node@v4+ with:+ node-version: "20"+ cache: "npm"++ - name: Install dependencies+ run: npm ci++ - name: ESLint+ run: npm run lint++ - name: Build Test (includes TypeScript check)+ run: npm run build++ - name: Database Migration Test+ run: |+ npm run db:generate+ npm run db:migratediff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 05b2695..7033f16 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -10,8 +10,37 @@ permissions:packages: writejobs:+ test:+ name: Run Tests+ runs-on: ubuntu-latest+ steps:+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Setup Node.js+ uses: actions/setup-node@v4+ with:+ node-version: "20"+ cache: "npm"++ - name: Install dependencies+ run: npm ci++ - name: ESLint+ run: npm run lint++ - name: Build Test (includes TypeScript check)+ run: npm run build++ - name: Database Migration Test+ run: |+ npm run db:generate+ npm run db:migrate+release:+ name: Create Releaseruns-on: ubuntu-latest+ needs: teststeps:- name: Checkout codeuses: actions/checkout@v4diff --git a/README.md b/README.mdindex 03f4321..abf0234 100644--- a/README.md+++ b/README.md@@ -215,6 +215,41 @@ $ npm run db:studio---+## π§ͺ Testing & Quality Assurance++### Automated CI Tests++All pull requests are automatically tested with GitHub Actions:++- **ESLint** β Checks code quality and style+- **Build Test** β Ensures the application builds successfully (includes TypeScript validation)+- **Database Migrations** β Verifies migrations run without errors++### Local Testing++Run these commands before submitting a pull request:++```bash+# Run all tests (lint + build with TypeScript check)+$ npm test++# Run individual checks+$ npm run lint # ESLint code quality check+$ npm run build # Next.js production build (includes TypeScript validation)++# Full CI test suite (includes database migration test)+$ npm run test:ci+```++**Recommended Pre-Commit Workflow:**++1. Run `npm test` to catch issues early+2. Fix any TypeScript or linting errors+3. Ensure build completes successfully+4. Commit and push your changes++---+## π Support the ProjectYour support helps maintain and improve this project! Please consider:diff --git a/package.json b/package.jsonindex 75d2b8b..2262a60 100644--- a/package.json+++ b/package.json@@ -7,6 +7,8 @@"build": "next build","start": "next start","lint": "eslint",+ "test": "npm run lint && npm run build",+ "test:ci": "npm run lint && npm run build && npm run db:generate && npm run db:migrate","db:generate": "drizzle-kit generate","db:migrate": "drizzle-kit migrate","db:studio": "drizzle-kit studio",