Skip to content

Commit

Permalink
ci: setup latest LTS Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Dec 10, 2024
1 parent 5aba572 commit f5e49de
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
- name: Setup Node environment
uses: actions/setup-node@v4
with:
node-version: 20
node-version: lts/*
check-latest: true
architecture: x64
registry-url: https://registry.npmjs.org/
cache: pnpm
Expand All @@ -47,7 +48,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20]
node-version: [lts/*]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -60,6 +61,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
architecture: x64
registry-url: https://registry.npmjs.org/
cache: pnpm
Expand All @@ -76,7 +78,7 @@ jobs:
pnpm test:all
- name: Perform code coverage report action
uses: codecov/codecov-action@v5
if: ${{ matrix.node-version == 20 && matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.node-version == 'lts/*' && matrix.os == 'ubuntu-latest' }}
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -87,7 +89,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20]
node-version: [lts/*]
browser: [chrome, firefox]
steps:
- name: Checkout repository
Expand All @@ -101,6 +103,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
architecture: x64
registry-url: https://registry.npmjs.org/
cache: pnpm
Expand All @@ -125,7 +128,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20]
node-version: [lts/*]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -138,6 +141,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
architecture: x64
registry-url: https://registry.npmjs.org/
cache: pnpm
Expand All @@ -154,7 +158,7 @@ jobs:
pnpm build
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: ${{ matrix.node-version == 20 && matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.node-version == 'lts/*' && matrix.os == 'ubuntu-latest' }}
with:
name: app
path: .next
Expand All @@ -173,7 +177,8 @@ jobs:
- name: Setup Node environment
uses: actions/setup-node@v4
with:
node-version: 20
node-version: lts/*
check-latest: true
architecture: x64
registry-url: https://registry.npmjs.org/
- name: Release to GitHub
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/gatsby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
- name: Setup Node environment
uses: actions/setup-node@v4
with:
node-version: 20
node-version: lts/*
check-latest: true
architecture: x64
registry-url: https://registry.npmjs.org/
cache: pnpm
Expand All @@ -41,7 +42,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20]
node-version: [lts/*]
architecture: [x64]
steps:
- name: Checkout repository
Expand All @@ -58,6 +59,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
architecture: ${{ matrix.architecture }}
registry-url: https://registry.npmjs.org/
cache: pnpm
Expand All @@ -75,7 +77,7 @@ jobs:
pnpm badge
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: ${{ matrix.node-version == 20 && matrix.os == 'ubuntu-latest' && matrix.architecture == 'x64' }}
if: ${{ matrix.node-version == 'lts/*' && matrix.os == 'ubuntu-latest' && matrix.architecture == 'x64' }}
with:
name: badges
path: public
Expand All @@ -86,7 +88,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20]
node-version: [lts/*]
architecture: [x64]
steps:
- name: Checkout repository
Expand All @@ -103,6 +105,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
architecture: ${{ matrix.architecture }}
registry-url: https://registry.npmjs.org/
cache: pnpm
Expand All @@ -119,7 +122,7 @@ jobs:
pnpm build:gh-pages
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: ${{ matrix.node-version == 20 && matrix.os == 'ubuntu-latest' && matrix.architecture == 'x64' }}
if: ${{ matrix.node-version == 'lts/*' && matrix.os == 'ubuntu-latest' && matrix.architecture == 'x64' }}
with:
name: demos
path: public
Expand Down

0 comments on commit f5e49de

Please sign in to comment.