Skip to content

perf: replace node-forge with node:crypto, drop ~313 KB from bundles #168

perf: replace node-forge with node:crypto, drop ~313 KB from bundles

perf: replace node-forge with node:crypto, drop ~313 KB from bundles #168

Workflow file for this run

name: Pull Request
on:
pull_request:
jobs:
distributed-tasks:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
target: ['lint:ci', 'test:all', 'build']
env:
DEFAULT_TARGET: 'test:all'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version: '26'
cache: 'npm'
- name: Free Disk Space
if: ${{ matrix.target == 'test:all' }}
run: |
df -h
echo "Cleaning up disk space by removing unnecessary files..."
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
df -h
- run: npm ci --ignore-scripts
- run: npm run ${{ matrix.target }}
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995 # v8.1.0
if: ${{ matrix.target == env.DEFAULT_TARGET && env.SONAR_TOKEN != null }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
integration-test-node:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
node: ['22', '24', '26']
env:
DEFAULT_NODE_VERSION: '26'
name: Node ${{ matrix.node }} integration test
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci --ignore-scripts
- name: Run audit
if: ${{ matrix.node == env.DEFAULT_NODE_VERSION }}
run: npm run audit
- run: npm run test:all
trace-requirements:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
name: Trace requirements
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Cache OFT JARs
uses: actions/cache@v5
with:
path: ~/.m2/repository/
key: oft-${{ hashFiles('.github/workflows/oftw.sh') }}
restore-keys: oft
- run: npm run trace
build:
runs-on: ubuntu-slim
permissions:
contents: read
needs: [distributed-tasks, integration-test-node, trace-requirements]
steps:
- run: echo "All checks passed, build successful!"