Skip to content

Release 0.7.0

Release 0.7.0 #1294

Workflow file for this run

name: Node PR Lint, Build and Test
# This workflow handles three scenarios:
#
# 1. Push to `next`, `dev/*`, or `feature/*` branches:
# - Runs `code-quality-and-tests`
# - Skips `integration-tests` and `build-and-package` to save resources and focus on code quality
#
# 2. Pull Requests to `main` or `next`:
# - Runs all jobs: code checks, tests, integration tests, and packaging
# - Ensures complete validation including artifact generation before merge
#
# 3. Push to `main`:
# - Runs full workflow for release validation and artifact generation
on:
workflow_dispatch:
push:
branches:
- main
- next
- dev/*
- feature/*
pull_request:
branches:
- main
- next
- dev/*
- feature/*
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
code-quality-and-tests:
name: Code Quality & Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: '.'
steps:
- name: ✅ Checkout Repository
uses: actions/checkout@v4
- name: 🛠 Setup Node.js Environment (with cache)
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: 📦 Install Dependencies (npm ci)
run: npm ci --prefer-offline --no-audit --no-fund --progress=false --verbose
- name: 🌐 Check Localization Files
run: npm run l10n:check
- name: 🧹 Run ESLint
run: npm run lint
- name: 🎨 Check Code Formatting (Prettier)
run: npm run prettier
- name: 🧪 Run Unit Tests (Jest)
run: npm run jesttest
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
needs: [code-quality-and-tests]
if: |
github.ref == 'refs/heads/main' ||
(startsWith(github.ref, 'refs/pull/') && (
github.base_ref == 'main' ||
github.base_ref == 'next'
))
defaults:
run:
working-directory: '.'
steps:
- name: ✅ Checkout Repository
uses: actions/checkout@v4
- name: 🛠 Setup Node.js Environment (with cache)
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: 📦 Install Dependencies (npm ci)
run: npm ci --prefer-offline --no-audit --no-fund --progress=false
- name: 🔄 Run Integration Tests (Headless UI)
run: xvfb-run -a npm test
# Run only on push to `main` or for PRs to main or next
# Skip on direct pushes to `next`, `dev/*`, and `feature/*` branches
build-and-package:
name: Build & Package Artifacts
runs-on: ubuntu-latest
needs: [code-quality-and-tests]
if: |
github.ref == 'refs/heads/main' ||
(startsWith(github.ref, 'refs/pull/') && (
github.base_ref == 'main' ||
github.base_ref == 'next'
))
defaults:
run:
working-directory: '.'
steps:
- name: ✅ Checkout Repository
uses: actions/checkout@v4
- name: 🛠 Setup Node.js Environment (with cache)
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: 📦 Install Dependencies (npm ci)
run: npm ci --prefer-offline --no-audit --no-fund --progress=false
- name: 🏗 Build Project
run: npm run build
- name: 📦 Package Distributables (vsix/tgz)
run: npm run package
- name: 📤 Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts-${{ github.run_id }}
path: |
**/*.vsix
**/*.tgz
!**/node_modules