docs(v2): New front page #1777
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |