From 59f397e5ee504f41ea4c020d6f1277d6c6834dd1 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:01:29 +0000 Subject: [PATCH 1/9] chore: checl if ci takes node from file --- .github/workflows/CI.yml | 51 ++++--------------------- .github/workflows/release.yml | 14 ++++--- src/locales/fr.json | 70 ----------------------------------- todo.md | 3 +- 4 files changed, 16 insertions(+), 122 deletions(-) delete mode 100644 src/locales/fr.json diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2a82d6b9..cff737bc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,9 +15,10 @@ jobs: - ubuntu-latest # - macos-latest # - windows-latest - node_version: + ## automatically infer node versio from .node-version file + # node_version: # - 18 - - 20 + # - 20 # - 22 architecture: - x64 @@ -25,61 +26,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - # - uses: pnpm/action-setup@v4 - # name: Install pnpm - # with: - # version: 9 + - uses: wyvox/action-setup-pnpm@v3 with: node-version: ${{ matrix.node_version }} - # - name: Install Node.js - # uses: actions/setup-node@v4 - # with: - # node-version: ${{ matrix.node_version }} - # architecture: ${{ matrix.architecture }} - # cache: "pnpm" + - name: Install dependencies run: pnpm install - # - name: Get pnpm store directory - # shell: bash - # run: | - # echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - # - uses: actions/cache@v4 - # name: Setup pnpm cache - # with: - # path: ${{ env.STORE_PATH }} - # key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - # restore-keys: | - # ${{ runner.os }}-pnpm-store- - - # - name: Set SENTRY_AUTH_TOKEN env if secret exists - # run: | - # if [[ -n "${{ secrets.SENTRY_AUTH_TOKEN }}" ]]; then - # echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> $GITHUB_ENV - # fi + - name: Build Next.js for E2E tests run: pnpm build - # TODO: Add commitlint to PRs - # - if: github.event_name == 'pull_request' - # name: Validate all commits from PR - # run: pnpx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose - - # - name: Linter - # run: pnpm lint - - # - name: Upload coverage reports to Codecov - # uses: codecov/codecov-action@v3 - # 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: pnpm run test-storybook:ci - name: Run E2E tests run: pnpm run test:e2e # env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b5d5b10..2beeccb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: release: strategy: matrix: - node-version: [20.x] + node_version: [20.x] name: Create a new release runs-on: ubuntu-latest @@ -23,14 +23,16 @@ jobs: pull-requests: write # to be able to comment on released pull requests steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + + - uses: wyvox/action-setup-pnpm@v3 with: - node-version: ${{ matrix.node-version }} - cache: "npm" + node-version: ${{ matrix.node_version }} + + - run: HUSKY=0 npm ci - name: Release diff --git a/src/locales/fr.json b/src/locales/fr.json deleted file mode 100644 index 2b1eb475..00000000 --- a/src/locales/fr.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "RootLayout": { - "home_link": "Accueil", - "about_link": "A propos", - "guestbook_link": "Livre d'or", - "portfolio_link": "Portfolio", - "sign_in_link": "Se connecter", - "sign_up_link": "S'inscrire" - }, - "BaseTemplate": { - "description": "Code de démarrage pour Next.js avec Tailwind CSS", - "made_with": "Fait avec" - }, - "Index": { - "meta_title": "Présentation de Next.js Boilerplate", - "meta_description": "Next js Boilerplate est le code de démarrage parfait pour votre projet. Construisez votre application React avec le framework Next.js." - }, - "Guestbook": { - "meta_title": "Livre d'or", - "meta_description": "Un exemple de fonctionnement CRUD", - "database_powered_by": "Base de données propulsée par", - "loading_guestbook": "Chargement du livre d'or..." - }, - "GuestbookForm": { - "username": "Nom d'utilisateur", - "body": "Message", - "save": "Sauvegarder" - }, - "About": { - "meta_title": "A propos", - "meta_description": "A propos description", - "about_paragraph": "Bienvenue sur notre page À propos ! Nous sommes une équipe de passionnés et dévoués à la création de logiciels.", - "translation_powered_by": "Traduction propulsée par" - }, - "Portfolio": { - "meta_title": "Portfolio", - "meta_description": "Bienvenue sur la page de mon portfolio !", - "presentation": "Bienvenue sur ma page portfolio ! Vous trouverez ici une collection soigneusement organisée de mon travail et de mes réalisations. À travers ce portfolio, je mets en valeur mon expertise, ma créativité et la valeur que je peux apporter à vos projets.", - "portfolio_name": "Portfolio {name}", - "error_reporting_powered_by": "Rapport d'erreur propulsé par", - "coverage_powered_by": "Couverture de code propulsée par" - }, - "PortfolioSlug": { - "meta_title": "Portfolio {slug}", - "meta_description": "Description du Portfolio {slug}", - "header": "Portfolio {slug}", - "content": "Créé un ensemble de matériel promotionnel et d'éléments de marquage pour un événement d'entreprise. Conçu un thème visuellement unifié, englobant un logo, des affiches, des bannières et des actifs numériques. Intégrer l'identité de marque du client tout en l'insufflant à une approche contemporaine et innovante. Des réponses favorables de la part des participants ont été obtenues, ce qui a donné lieu à un événement réussi avec un engagement accru des participants et une meilleure visibilité de la marque.", - "log_management_powered_by": "Gestion des logs propulsée par" - }, - "SignIn": { - "meta_title": "Se connecter", - "meta_description": "Connectez-vous à votre compte avec facilité." - }, - "SignUp": { - "meta_title": "S'inscrire", - "meta_description": "Créez un compte sans effort grâce à notre processus d'inscription intuitif." - }, - "Dashboard": { - "meta_title": "Tableau de bord", - "hello_message": "Bonjour {email}!" - }, - "UserProfile": { - "meta_title": "Profil de l'utilisateur" - }, - "DashboardLayout": { - "dashboard_link": "Tableau de bord", - "user_profile_link": "Gérer votre compte", - "sign_out": "Se déconnecter" - } -} diff --git a/todo.md b/todo.md index 13485137..0b7ede35 100644 --- a/todo.md +++ b/todo.md @@ -2,5 +2,4 @@ TODO: update `README.md` as per https://github.com/lobehub/sd-webui-lobe-theme TODO: add github social preview banner TODO: ability to rotate selected images TODO: add total pages count in pdf - -TODO: replace eng string with i18n string +TODO: add proper seo meta tags to pages From b91d4b9a5c80e8cb6c8a16b349c007b31cc71456 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:06:33 +0000 Subject: [PATCH 2/9] chore: revert changes --- .github/workflows/CI.yml | 17 ++++------------- .github/workflows/vercel.yaml | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cff737bc..06be757c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,21 +8,12 @@ on: jobs: build_and_test: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: - os: - - ubuntu-latest - # - macos-latest - # - windows-latest - ## automatically infer node versio from .node-version file - # node_version: - # - 18 - # - 20 - # - 22 - architecture: - - x64 - name: E2E tests with node@${{ matrix.node_version }} on ${{ matrix.os }} - ${{ matrix.architecture }} + node_version: [20.x] + + name: E2E tests with node@${{ matrix.node_version }} steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/vercel.yaml b/.github/workflows/vercel.yaml index 849102a8..efc0d533 100644 --- a/.github/workflows/vercel.yaml +++ b/.github/workflows/vercel.yaml @@ -1,4 +1,4 @@ -name: Production Tag Deployment +name: Vercel Deploymnet env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} From e885ae7764c6e7ff78e91087852160e9978876a5 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:13:54 +0000 Subject: [PATCH 3/9] chore: possible a fix for checkly --- .github/workflows/checkly.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checkly.yml b/.github/workflows/checkly.yml index f33a7beb..0614a199 100644 --- a/.github/workflows/checkly.yml +++ b/.github/workflows/checkly.yml @@ -30,10 +30,9 @@ jobs: - 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@v3 + - uses: wyvox/action-setup-pnpm@v3 with: node-version: ${{ matrix.node-version }} - cache: "npm" - name: Restore or cache node_modules id: cache-node-modules @@ -48,7 +47,7 @@ jobs: - name: Run checks # run the checks passing in the ENVIRONMENT_URL and recording a test session. id: run-checks - run: npx checkly test -e ENVIRONMENT_URL=${{ env.ENVIRONMENT_URL }} --reporter=github --record + run: pnpx checkly test -e ENVIRONMENT_URL=${{ env.ENVIRONMENT_URL }} --reporter=github --record - name: Create summary # export the markdown report to the job summary. id: create-summary @@ -57,4 +56,4 @@ jobs: - 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 + run: pnpx checkly deploy --force From 7dadbd986edb5e33228911627256d301de9e783f Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:18:32 +0000 Subject: [PATCH 4/9] chore: update npm dependency to pnpm --- .github/workflows/checkly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checkly.yml b/.github/workflows/checkly.yml index 0614a199..1eceb3e8 100644 --- a/.github/workflows/checkly.yml +++ b/.github/workflows/checkly.yml @@ -43,7 +43,7 @@ jobs: - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci + run: pnpm i - name: Run checks # run the checks passing in the ENVIRONMENT_URL and recording a test session. id: run-checks From 99417e935f19923cfb56d419692941096c43b142 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:24:34 +0000 Subject: [PATCH 5/9] chore(ci): use cache for pnpm build --- .github/workflows/CI.yml | 16 +++++++++------- .github/workflows/checkly.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 06be757c..71b69276 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,25 +11,27 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node_version: [20.x] + node_version: [20] name: E2E tests with node@${{ matrix.node_version }} steps: - name: Checkout uses: actions/checkout@v4 - - - uses: wyvox/action-setup-pnpm@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node_version }} - + cache: 'pnpm' - name: Install dependencies run: pnpm install - - - name: Build Next.js for E2E tests run: pnpm build - - name: Install Playwright (used for Storybook and E2E tests) run: npx playwright install --with-deps diff --git a/.github/workflows/checkly.yml b/.github/workflows/checkly.yml index 1eceb3e8..6947459b 100644 --- a/.github/workflows/checkly.yml +++ b/.github/workflows/checkly.yml @@ -12,7 +12,7 @@ jobs: test-e2e: strategy: matrix: - node-version: [20.x] + node-version: [20] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ if: github.event.deployment_status.state == 'success' # Only run when the deployment was successful. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2beeccb2..fd3a044b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: release: strategy: matrix: - node_version: [20.x] + node_version: [20] name: Create a new release runs-on: ubuntu-latest From 1b9d711f93c5fc4c1ee97ff63cfbf913faecbd73 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:32:18 +0000 Subject: [PATCH 6/9] chore(ci): optimize caching for pnpm build --- .github/workflows/CI.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 71b69276..6cf774f0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,6 +17,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + + - uses: actions/cache@v4 + with: + # See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node + path: | + ~/.pnpm-store + ${{ github.workspace }}/.next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- - name: Install pnpm uses: pnpm/action-setup@v4 From f5d94d84ff17196e3d70b4bc1c38f02a5ded3e91 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:44:02 +0000 Subject: [PATCH 7/9] chore: update repository URL and project name --- checkly.config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/checkly.config.ts b/checkly.config.ts index 9059352c..96180259 100644 --- a/checkly.config.ts +++ b/checkly.config.ts @@ -3,14 +3,14 @@ import { defineConfig } from "checkly"; import { EmailAlertChannel, Frequency } from "checkly/constructs"; const emailChannel = new EmailAlertChannel("email-channel-1", { - address: "", + address: "avm244@proton.me", sendDegraded: true, }); -export const config = defineConfig({ - projectName: "Next.js Boilerplate", - logicalId: "nextjs-boilerplate", - repoUrl: "https://github.com/ixartz/Next-js-Boilerplate", +export const = defineConfig({ + projectName: "aVToolz", + logicalId: "avtoolz", + repoUrl: "https://github.com/a0v0/avtoolz", checks: { locations: ["us-east-1", "eu-west-1"], tags: ["website"], From e7f60a42f5db7103838515812a8d47c8a11a1230 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:45:57 +0000 Subject: [PATCH 8/9] chore: update repository URL and project name --- checkly.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkly.config.ts b/checkly.config.ts index 96180259..7df99a79 100644 --- a/checkly.config.ts +++ b/checkly.config.ts @@ -7,7 +7,7 @@ const emailChannel = new EmailAlertChannel("email-channel-1", { sendDegraded: true, }); -export const = defineConfig({ +export const config = defineConfig({ projectName: "aVToolz", logicalId: "avtoolz", repoUrl: "https://github.com/a0v0/avtoolz", From 2631db6e25bda69ccb9e6f3988b76adce96a2741 Mon Sep 17 00:00:00 2001 From: aV <62926341+a0v0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:47:39 +0000 Subject: [PATCH 9/9] chore: Update email address in checkly.config.ts --- checkly.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkly.config.ts b/checkly.config.ts index 7df99a79..f2dfbaa5 100644 --- a/checkly.config.ts +++ b/checkly.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from "checkly"; import { EmailAlertChannel, Frequency } from "checkly/constructs"; const emailChannel = new EmailAlertChannel("email-channel-1", { - address: "avm244@proton.me", + address: process.env.CHECKLY_EMAIL_ADDRESS ?? "", sendDegraded: true, });