Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions #1

Merged
merged 6 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PR description :hammer:

Explain (in few sentences or bullet points) what has been done

## Author checklist :white_check_mark:

- [ ] :ticket: PR has been linked to Jira ticket
- [ ] :hourglass: Time has been tracked in Jira
18 changes: 18 additions & 0 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: i18n
on:
# Only run on PRs into master
pull_request:
branches:
- master

jobs:
i18n:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: true
- name: Check Localization
run: |
pnpm i18n
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint
on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: true
- name: Lint
run: |
pnpm lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: true
- name: Typecheck
run: |
pnpm tsc
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: true
- name: Run prettier
run: |
pnpm format
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Test'
on:
pull_request:
workflow_dispatch:
jobs:
test:
permissions:
checks: write
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: |
pnpm test
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ next-env.d.ts

# husky
/.husky/

# Ignore autogenerated files
.infisical.json
components.json
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,3 @@ Customize and configure your Next.js project to match your preferences and proje
### 📦 UI Components Configuration

- **shadcn/ui**: Modify the `components.json` to configure or extend the UI components provided by `shadcn/ui`.

78 changes: 41 additions & 37 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
import {withSentryConfig} from '@sentry/nextjs';
import { withSentryConfig } from '@sentry/nextjs';
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default withSentryConfig(nextConfig, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

// Suppresses source map uploading logs during build
silent: true,
org: "zerodays",
project: "nextjs-template",
}, {
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: true,

// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
});
export default withSentryConfig(
nextConfig,
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

// Suppresses source map uploading logs during build
silent: true,
org: 'zerodays',
project: 'nextjs-template',
},
{
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: true,

// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
},
);
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "nextjs-template",
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@9.1.0",
"scripts": {
"dev": "infisical run -- next dev",
"build": "next build",
Expand All @@ -11,7 +12,8 @@
"format": "prettier --check --ignore-path .prettierignore .",
"format:fix": "prettier --write --ignore-path .prettierignore .",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"i18n": "tsx ./scripts/validate-translations.ts"
},
"dependencies": {
"@hookform/resolvers": "^3.3.4",
Expand Down Expand Up @@ -69,6 +71,7 @@
"prettier-plugin-tailwindcss": "^0.5.14",
"tailwindcss": "^3.4.1",
"ts-node": "^10.9.2",
"tsx": "^4.10.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.8.0"
},
Expand Down
Loading