Skip to content

Commit

Permalink
Merge pull request #2 from hack4impact-calpoly/develop
Browse files Browse the repository at this point in the history
Template updates
  • Loading branch information
ryanchansf authored Oct 19, 2024
2 parents 16f228b + f59ae3e commit 35056f5
Show file tree
Hide file tree
Showing 17 changed files with 2,522 additions and 996 deletions.
3 changes: 0 additions & 3 deletions .env.example

This file was deleted.

3 changes: 3 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# create local copy of this file and rename to .env.local
# make sure to add .env.local to .gitignore!!
MONGO_URI={mongo-uri-here}
7 changes: 6 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"extends": ["next/core-web-vitals", "prettier"]
"parser": "@typescript-eslint/parser",
"extends": ["next/core-web-vitals", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ci

# Controls when the workflow will run
on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main", "develop"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Use matrix strategy to test multiple Node.js versions
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Dry-run build
run: npm run build
env:
# These env variables must be set in the repository's secrets
# - Settings -> Secrets and variables -> New repository secret
MONGO_URI: ${{ secrets.MONGO_URI }}
# Add additional environment variables here

- name: Run tests
run: npm test
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,jsx,ts,tsx}": "eslint --fix",
"*.{js,jsx,ts,tsx,css,md,json}": "prettier --write"
}
6 changes: 5 additions & 1 deletion docs/template-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ This template uses Next.js version 14.0.0. The following lists what is configure
6. Import aliasing. See paths in `tsconfig.json` for predefined aliases
7. Template documentation to fill in
8. Two branches called `develop` and `main` (if you selected copy branches when creating from template)
9. Issue and Pull Request templates. Modify them in the `.github` folder
10. Some common GitHub tags
11. Pre-commit linting hook with Husky and lint-staged
12. Continuous integration with GitHub Actions

Last updated 10/27/23
Last updated 10/17/2024
Loading

0 comments on commit 35056f5

Please sign in to comment.