Skip to content

Commit

Permalink
feat: update de Next.js Boilerplate v3.58.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ixartz committed Oct 4, 2024
1 parent e74cb70 commit 16aea65
Show file tree
Hide file tree
Showing 94 changed files with 9,168 additions and 10,370 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in

# Stripe
# If you need a real Stripe subscription payment with checkout page, customer portal, webhook, etc.
# You can check out the Next.js Boilerplate Pro: https://nextjs-boilerplate.com/pro-saas-starter-kit
# You can check out the Next.js Boilerplate Pro at: https://nextjs-boilerplate.com/pro-saas-starter-kit
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51PNk4fKOp3DEwzQle6Cx1j3IW1Lze5nFKZ4JBX0gLpNQ3hjFbMiT25gw7LEr369ge7JIsVA2qRhdKQm1NAmVehXl00FQxwRfh1
# Use Stripe test mode price id or production price id
BILLING_PLAN_ENV=dev
Expand Down
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

107 changes: 0 additions & 107 deletions .eslintrc.json

This file was deleted.

6 changes: 2 additions & 4 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
github: ixartz
custom:
[
"https://nextjs-boilerplate.com/pro-saas-starter-kit",
"https://nextlessjs.com",
]
- 'https://nextjs-boilerplate.com/pro-saas-starter-kit'
- 'https://nextlessjs.com'
43 changes: 38 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
node-version: [20.x, 22.6]
node-version: [20.x, 22.6] # Need to use 22.6 due to Next.js build errors: https://github.com/vercel/next.js/issues/69263
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

name: Build with ${{ matrix.node-version }}
Expand All @@ -22,7 +22,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: npm
- run: npm ci
- run: npm run build

Expand All @@ -42,13 +42,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: npm
- run: npm ci

- name: Build Next.js for E2E tests
run: npm run build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}

- if: github.event_name == 'pull_request'
name: Validate all commits from PR
Expand All @@ -61,24 +62,56 @@ jobs:
run: npm run check-types

- name: Run unit tests
run: npm run test
run: npm run test -- --coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Install Playwright (used for Storybook and E2E tests)
run: npx playwright install --with-deps

- name: Run storybook tests
run: npm run test-storybook:ci

- name: Run E2E tests
run: npx percy exec -- npm run test:e2e
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}

- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: test-results/
retention-days: 7

synchronize-with-crowdin:
name: GitHub PR synchronize with Crowdin
runs-on: ubuntu-latest

needs: [build, test]
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # Crowdin Actions needs to push commits to the PR branch, checkout HEAD commit instead of merge commit
fetch-depth: 0

- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
download_translations: true
create_pull_request: false
localization_branch_name: ${{ github.head_ref || github.ref_name }} # explanation here: https://stackoverflow.com/a/71158878
commit_message: 'chore: new Crowdin translations by GitHub Action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/checkly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Checkly

on: [deployment_status]

env:
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }}
CHECKLY_ACCOUNT_ID: ${{ secrets.CHECKLY_ACCOUNT_ID }}
CHECKLY_TEST_ENVIRONMENT: ${{ github.event.deployment_status.environment }}

jobs:
test-e2e:
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

# Only run when the deployment was successful
if: github.event.deployment_status.state == 'success'

name: Test E2E on Checkly
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.deployment_status.deployment.ref }}'
fetch-depth: 0

- name: Set branch name # workaround to detect branch name in "deployment_status" actions
run: echo "CHECKLY_TEST_REPO_BRANCH=$(git show -s --pretty=%D HEAD | tr -s ',' '\n' | sed 's/^ //' | grep -e 'origin/' | head -1 | sed 's/\origin\///g')" >> $GITHUB_ENV

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Restore or cache node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Run checks # run the checks passing in the ENVIRONMENT_URL and recording a test session.
id: run-checks
run: npx checkly test --reporter=github --record
env:
VERCEL_BYPASS_TOKEN: ${{ secrets.VERCEL_BYPASS_TOKEN }}
ENVIRONMENT_URL: ${{ github.event.deployment_status.environment_url }}

- name: Create summary # export the markdown report to the job summary.
id: create-summary
run: cat checkly-github-report.md > $GITHUB_STEP_SUMMARY

- name: Deploy checks # if the test run was successful and we are on Production, deploy the checks
id: deploy-checks
if: steps.run-checks.outcome == 'success' && github.event.deployment_status.environment == 'Production'
run: npx checkly deploy --force
33 changes: 33 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Crowdin Action

on:
push:
branches: [main] # Run on push to the main branch
schedule:
- cron: '0 5 * * *' # Run every day at 5am
workflow_dispatch: # Run manually

jobs:
synchronize-with-crowdin:
name: Synchronize with Crowdin
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
download_translations: true
localization_branch_name: l10n_crowdin_translations
create_pull_request: true
pull_request_title: New Crowdin Translations
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: main
commit_message: 'chore: new Crowdin translations by GitHub Action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
workflow_run:
workflows: ["CI"]
workflows: [CI]
types:
- completed
branches:
Expand All @@ -23,14 +23,14 @@ jobs:
pull-requests: write # to be able to comment on released pull requests

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: npm
- run: HUSKY=0 npm ci

- name: Release
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Update dependencies
on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
- cron: '0 0 1 * *'

jobs:
update:
Expand All @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: npm
- run: npm ci

- run: npx npm-check-updates -u # Update dependencies
Expand All @@ -29,5 +29,5 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "build: update dependencies to the latest version"
commit-message: 'build: update dependencies to the latest version'
title: Update dependencies to the latest version
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
# Disable concurent to run `check-types` after ESLint in lint-staged
cd "$(dirname "$0")/.." && npx lint-staged --concurrent false
cd "$(dirname "$0")/.." && npx --no lint-staged --concurrent false
1 change: 1 addition & 0 deletions .vscode/i18n-ally-custom-framework.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# eslint-disable yaml/quotes
languageIds:
- javascript
- typescript
Expand Down
Loading

0 comments on commit 16aea65

Please sign in to comment.