Skip to content

Commit

Permalink
refactor(core): Use biomejs and fix next-intl
Browse files Browse the repository at this point in the history
  • Loading branch information
wootsbot committed Dec 18, 2024
1 parent 6d0e03e commit 18bdc9c
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 38 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."

- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json
cache: "pnpm"

- name: 🔥 Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${{ env.PNPM_VERSION}} --activate
- name: 🔥 Setup corepack
run: corepack enable

- name: 📦 Install Dependencies
run: |
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/pull_request_stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
- '**.md'

env:
PNPM_VERSION: ${{ vars.PNPM_VERSION }}
NODE_VERSION: ${{ vars.NODE_VERSION }}
NEXT_PUBLIC_API_URL_BASE: ${{ vars.NEXT_PUBLIC_API_URL_BASE }}
NEXT_PUBLIC_SITE_URL: ${{ vars.NEXT_PUBLIC_SITE_URL }}
SITE_NAME: ${{ vars.SITE_NAME }}
Expand All @@ -29,28 +27,34 @@ jobs:
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."

- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json
cache: "pnpm"

- name: 🔥 Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${{ env.PNPM_VERSION}} --activate
- name: 🔥 Setup corepack
run: corepack enable

- name: 📁 Cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: 📦 Install Dependencies
run: |
pnpm install --no-frozen-lockfile
pnpm --version && pnpm install --frozen-lockfile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 💣 build
- name: 💣 Build Application
run: pnpm build

- name: 💅 Lint
- name: 💅 Run Linter
run: pnpm lint
32 changes: 18 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
- main

env:
PNPM_VERSION: ${{ vars.PNPM_VERSION }}
NODE_VERSION: ${{ vars.NODE_VERSION }}
NEXT_PUBLIC_API_URL_BASE: ${{ vars.NEXT_PUBLIC_API_URL_BASE }}
NEXT_PUBLIC_SITE_URL: ${{ vars.NEXT_PUBLIC_SITE_URL }}
SITE_NAME: ${{ vars.SITE_NAME }}
Expand All @@ -34,30 +32,36 @@ jobs:
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."

- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: package.json
cache: "pnpm"

- name: 🔥 Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: 🔥 Setup corepack
run: corepack enable

- name: 📁 Cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: 📦 Install Dependencies
run: |
pnpm install --no-frozen-lockfile
pnpm --version && pnpm install --frozen-lockfile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 💣 build
- name: 💣 Build Application
run: pnpm build

- name: 💅 Lint
- name: 💅 Run Linter
run: pnpm lint

- name: Create Release Pull Request
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"files": {
"ignoreUnknown": false,
"ignore": [".next/**", "public/**", "node_modules/**", "pnpm-lock.yaml", "playwright-report/**"]
"ignore": [".next/**", "public/**", "node_modules/**", "pnpm-lock.yaml", "playwright-report/**", ".changeset/**"]
},
"formatter": {
"enabled": true,
Expand Down

0 comments on commit 18bdc9c

Please sign in to comment.