Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.

Migrate from npm to bun for improved build performance #638

Migrate from npm to bun for improved build performance

Migrate from npm to bun for improved build performance #638

Workflow file for this run

name: Node.js CI
on:
pull_request:
branches:
- main
env:
MAX_HIGH: 0
MAX_CRITICAL: 0
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# These versions match Upsun support
# Node.js: https://docs.upsun.com/languages/nodejs.html#supported-versions
node-version: [22.x, 24.x]
# Python: https://docs.upsun.com/languages/python.html#supported-versions
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
################################################################################################
# A. Setup workflow.
- name: "1. Retrieve local files."
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "2. Set up Node.js."
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: "3. Python."
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
################################################################################################
# B. Prettify, lint, and test repo.
- name: "4. Set up Bun"
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: "5. Preparing"
run: |
echo "::notice::Running react-scripts tests."
export CI=true
npm install cross-env npm-run-all -g
npm install
cd frontend && bun install
- name: "6. Verifying backend code is pretty"
run: |
npm run prettier:backend
- name: "7. Verifying frontend code is pretty"
run: |
npm run prettier:frontend
- name: "8. Linting frontend"
run: npm run lint:frontend
- name: "9. Run Frontend tests"
run: npm run test:frontend
- name: "10. Run Backend linting"
run: |
npm run lint:backend
################################################################################################
# C. Ensure no vulnerabilities.
- name: "11. Test: there should be no Python vulnerabilities."
run: |
echo "::notice::Checking for vulnerabilities in backend Python app dependencies."
npm run test:backend