Skip to content

chore: use lts version of Node.js #563

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

Merged
merged 2 commits into from
Sep 10, 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
69 changes: 37 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: CI

on:
Expand All @@ -8,9 +7,6 @@ on:
- renovate/**
pull_request:

env:
NODE_VERSION: 18

permissions: {}

jobs:
Expand All @@ -20,44 +16,50 @@ jobs:
if: "!startsWith(github.head_ref, 'renovate/')"

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Unit tests
run: yarn test --ci --coverage
- name: Unit tests
run: pnpm test -- --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4

lint:
name: Lint
runs-on: ubuntu-latest
if: "!startsWith(github.head_ref, 'renovate/')"

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'

- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: yarn lint
- name: Lint
run: pnpm lint

release:
needs: [tests, lint]
Expand All @@ -76,17 +78,20 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
node-version: 'lts/*'
cache: 'pnpm'

- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
run: pnpm install --frozen-lockfile

- name: Release
run: npx semantic-release --branches main
run: pnpm dlx semantic-release --branches main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
permissions:
issues: write
pull-requests: write
discussions: write

concurrency:
group: lock
Expand All @@ -18,4 +19,4 @@ jobs:
steps:
- uses: dessant/lock-threads@v5
with:
log-output: true
log-output: true
53 changes: 23 additions & 30 deletions .github/workflows/pkg-size-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ name: Package size report

on:
pull_request:
branches: [ main, next ]

env:
NODE_VERSION: 18
branches: [main, next]

permissions:
pull-requests: write
Expand All @@ -16,29 +13,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache node_modules
uses: actions/cache@v4
id: cache-nodemodules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --non-interactive

- name: Package size report
uses: pkg-size/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
hide-files: '*.{js,css}.map'
display-size: uncompressed, gzip
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Package size report
uses: pkg-size/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
hide-files: '*.{js,css}.map'
display-size: uncompressed, gzip
40 changes: 21 additions & 19 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Website

on:
Expand All @@ -8,9 +7,6 @@ on:
- renovate/**
pull_request:

env:
NODE_VERSION: 18

permissions: {}

jobs:
Expand All @@ -20,20 +16,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'

- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build website
run: yarn website
- name: Build website
run: pnpm website

deploy:
name: Deploy
Expand All @@ -45,17 +44,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
node-version: 'lts/*'
cache: 'pnpm'

- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
run: pnpm install --frozen-lockfile

- name: Build
run: yarn website
run: pnpm website

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ node_modules/
npm-debug.log
lib/
esm/
yarn-error.log
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

tasks:
- init: yarn install && yarn run build
- init: pnpm install && pnpm run build

vscode:
extensions:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
"format": "eslint src --fix --report-unused-disable-directives",
"lint": "eslint src --report-unused-disable-directives",
"prebump": "run-s lint test",
"prepublishOnly": "yarn run build",
"prepublishOnly": "pnpm run build",
"test": "cross-env BABEL_OUTPUT=commonjs jest",
"start": "webpack serve",
"website": "run-s website:clean website:build website:redirect",
"website:clean": "rimraf examples/dist",
"website:build": "cross-env BABEL_TARGET=examples NODE_ENV=production webpack",
"website:redirect": "cp -R examples/src/example examples/dist"
},
"packageManager": "[email protected]",
"repository": {
"type": "git",
"url": "https://github.com/reactjs/react-tabs.git"
Expand Down
Loading
Loading