Skip to content

Commit

Permalink
Merge pull request #5 from george-swift/ci/cd
Browse files Browse the repository at this point in the history
CI/CD: Add Github Workflow Triggered by PRs to Develop and Master branch
  • Loading branch information
george-swift authored Jan 26, 2025
2 parents fd9860c + 13057ea commit efde745
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pull Request Check
on:
pull_request:
branches: [master, develop]

jobs:
check-pr:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Run Prettier check
run: npm run prettier
- name: Run ESlint check
run: npm run lint
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "react-router build",
"dev": "react-router dev",
"start": "react-router-serve ./build/server/index.js",
"prettier": "prettier --check '{,!(node_modules|build|dist)/**/}*.{ts,tsx,js,jsx}' --plugin=@ianvs/prettier-plugin-sort-imports",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"typecheck": "react-router typegen && tsc",
"prepare": "husky"
Expand Down

0 comments on commit efde745

Please sign in to comment.