Skip to content

fix: run build before publishing packages (#1057) #1665

fix: run build before publishing packages (#1057)

fix: run build before publishing packages (#1057) #1665

Workflow file for this run

---
name: Jest
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions: read-all
jobs:
test:
runs-on: ${{ matrix.os }}
name: Test and build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [20.x, 22.x, 24.x]
steps:
- name: Checkout code for ${{ matrix.node }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@65d868f8d4d85d7d4abb7de0875cde3fcc8798f5
with:
node-version: ${{ matrix.node }}
# We have to install on all versions of node to ensure packages will
# support those versions
- name: Install packages
run: npm install --ignore-scripts
- name: Run Jest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
JEST_JUNIT_CLASSNAME: "{filepath}"
run: npm run test -- --coverage --reporters=jest-junit
- name: Build Typescript
run: npm run build
- name: Run codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
with:
directory: ./coverage
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3
with:
token: ${{ secrets.CODECOV_TOKEN }}