Skip to content

docs(v2): New front page #1777

docs(v2): New front page

docs(v2): New front page #1777

Workflow file for this run

name: CI
on:
push:
branches:
- master
- beta
pull_request:
jobs:
typecheck-outputs:
name: ๐Ÿšš Typecheck Outputs / ${{ matrix.typescript-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
typescript-version:
- "~5.4.0"
- "~5.3.0"
- "~5.2.0"
# This is the current lowest version of typescript we support. Do not
# change this without bumping a major version. We support up to 4
# versions back from the latest version of typescript at time of a
# major release.
- "~5.1.0"
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: โŽ” Setup node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: ๐Ÿ“ฅ Download deps
uses: bahmutov/npm-install@v1
# Order is important here, we build with the typescript version defined
# in package.json, before we overrite it for the tests.
# TODO: We are rebuilding everything several times, our builds aren't very
# expensive, but we can easily optimize by caching the 'dist' directory
# once.
- name: ๐Ÿ—๏ธ Build
run: npm run build
- name: ๐Ÿ“˜ Install Typescript
run: npm install -D typescript@${{ matrix.typescript-version }}
- name: ๐Ÿ”Ž Type check
run: npm run typeCheck:dist
typecheck-source:
name: ๐Ÿ‘ท Typecheck Source
runs-on: ubuntu-latest
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: โŽ” Setup node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: ๐Ÿ“ฅ Download deps
uses: bahmutov/npm-install@v1
- name: ๐Ÿ”Ž Type check
run: npm run typeCheck
test:
name: ๐Ÿงช Test [Node ${{ matrix.node }}]
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 22
- 20
- 18
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
- name: โŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: ๐Ÿ“ฅ Download deps
uses: bahmutov/npm-install@v1
- name: ๐Ÿงช Run tests
run: npm run test
lint:
name: ๐Ÿงน Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: ๐Ÿ“ฅ Download deps
uses: bahmutov/npm-install@v1
- name: Lint
run: npm run lint
prettier:
name: ๐Ÿ’„ Formatting (prettier)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: ๐Ÿ“ฅ Download deps
uses: bahmutov/npm-install@v1
- name: Prettier
run: npm run prettier
publish:
needs:
- typecheck-source
- typecheck-outputs
- test
if: github.repository == 'remeda/remeda' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta')
runs-on: ubuntu-latest
steps:
- name: โฌ‡๏ธ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: โŽ” Setup node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: ๐Ÿ“ฅ Download deps
uses: bahmutov/npm-install@v1
- name: ๐Ÿ—๏ธ Build
run: npm run build
- name: ๐Ÿ‘ฎ Lint output
run: npm run lint:build
- name: ๐Ÿš€ Release
run: npm run release
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}