Skip to content

Merge branch 'prod' into master #4

Merge branch 'prod' into master

Merge branch 'prod' into master #4

Workflow file for this run

name: Node.js CI Pipeline
on:
push:
branches:
- master
- develop
- 'feature/*'
- 'bugfix/*'
- 'release/*'
- 'hotfix/*'
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
concurrency:
group: ci-pipeline-${{ github.ref }}-node-${{ matrix.node-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
node-version: &node-version [22.x]
steps:
- &checkout-step
name: Checkout repo
uses: actions/checkout@v5
- &setup-pnpm-step
name: Setup pnpm
uses: pnpm/action-setup@v4
- &setup-node-step
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- &turbo-cache-step
name: Restore turbo cache
uses: actions/cache@v4
with:
path: |
.turbo
packages/**/.turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('**/turbo.json') }}
- &install-deps-step
name: Install deps
env:
NODE_OPTIONS: --max-old-space-size=4096
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Netlify build
run: pnpm netlify build --offline --filter packages/nouns-webapp
test:
name: Test
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: *node-version
steps:
- *checkout-step
- *setup-pnpm-step
- *setup-node-step
- *turbo-cache-step
- *install-deps-step
- name: Run tests
run: pnpm test
lint:
name: Lint
if: github.event_name == 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:
- *checkout-step
- *setup-pnpm-step
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm
- *turbo-cache-step
- *install-deps-step
- name: Build packages
run: pnpm build
- name: Lint changed files
run: |
echo "::add-matcher::.github/eslint-matcher.json"
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
git fetch origin $BASE_SHA $HEAD_SHA
FILES=$(git diff --name-only --diff-filter=d "$BASE_SHA"..."$HEAD_SHA" -- '*.ts' '*.tsx' '*.js' '*.jsx')
[ -z "$FILES" ] && echo 'no JS/TS changes' && exit 0
pnpm lint $FILES
translations:
name: Check for missing translations
if: github.event_name == 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:
- *checkout-step
- *setup-pnpm-step
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm
- *turbo-cache-step
- *install-deps-step
- name: Build packages
run: pnpm build
- name: Check for missing translations
run: |
pnpm --filter @nouns/webapp -- i18n:extract
pnpm --filter @nouns/webapp -- i18n:compile --strict