feature: crypto dashboard #8
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Node.js CI | |
# {1} | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
# {2} | |
- name: Checkout the source code | |
- uses: actions/checkout@v4 | |
# {3} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
# {4} | |
# Install pnpm using the standalone script | |
- name: Install pnpm | |
run: curl -fsSL https://get.pnpm.io/install.sh | sh - | |
# Alternatively, use pnpm env (if needed) | |
# - name: Install pnpm (using pnpm env) | |
# run: pnpm env | |
# {5} | |
- name: Install dependencies | |
- run: pnpm install | |
# {6} | |
# Optional: Run additional tests (e.g., E2E tests) | |
- name: Run E2E tests (if applicable) | |
if: ${{ runner.os == 'linux' }} # Only run on Linux for E2E tests (adjust if needed) | |
run: pnpm run e2e-ui | |
# {7} | |
# Optional: Run code formatting and linting checks | |
- name: Run code formatting | |
run: pnpm run prettier:verify | |
# {8} | |
- name: Run code linting | |
run: pnpm run lint | |
# {9} | |
- name: Run test | |
- run: pnpm test | |
# {10} | |
- name: Build | |
- run: pnpm run build --if-present |