TRACING-4435-BETA-4.6.1-2 #340
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: Build and test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout code | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
# Setup Node.js environment | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
# Remove existing node_modules to ensure a clean install | |
- run: rm -rf node_modules | |
# Install dependencies using npm ci (clean install) | |
- name: Install dependencies | |
run: npm ci --verbose | |
env: | |
NODE_ENV: development | |
# Build the project | |
- name: Build the project | |
run: npm run build | |
# Check types (optional) | |
- name: Run type checking | |
run: npm run types | |
# Run tests | |
- name: Run tests | |
run: npm test | |
# Upload build artifacts | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
dist/browser.js | |
dist/index.js |