Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/test.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests

on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
setup:
runs-on: ubuntu-latest
name: Compile and test MathJax
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false

- name: Install packages
run: |
pnpm -s -r i
pnpm -s link:src

- name: Compile MathJax
run: |
pnpm -s mjs:compile
components/bin/makeAll --mjs --terse --build components/mjs
pnpm -s cjs:compile
pnpm -s cjs:components:src:build
components/bin/makeAll --cjs --terse --build components/cjs
pnpm -s copy:pkg cjs

- name: Build tests
run: pnpm -s tsc -p testsuite/tsconfig.json

- name: Run tests
run: pnpm -s test:gh

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: mathjax/MathJax-src
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
![npm monthly downloads (full)](https://img.shields.io/npm/dm/mathjax-full?label=npm%20%28full%29)
![npm total downloads](https://img.shields.io/npm/dt/mathjax.svg?style=flat&label=npm%20total)
![npm total downloads](https://img.shields.io/npm/dt/mathjax-full.svg?style=flat&label=npm%20total%20%28full%29)
![test workflow](https://github.com/MathJax/MathJax-src/actions/workflows/test.js.yml/badge.svg?branch=develop)
[![codecov](https://codecov.io/gh/mathjax/mathjax-src/develop/main/graph/badge.svg)](https://codecov.io/gh/mathjax/mathjax-src)

## Beautiful math in all browsers

Expand Down
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
"use-cjs": "echo '{\n \"extends\": \"./tsconfig/cjs.json\"\n}' > tsconfig.json",
"use-mjs": "echo '{\n \"extends\": \"./tsconfig/mjs.json\"\n}' > tsconfig.json",
"=============================================================================== aliases": "",
"test": "cd testsuite && pnpm -s test --",
"test": "cd testsuite && pnpm -s test --verbose",
"test:gh": "cd testsuite && pnpm -s test --silent",
"clean": "pnpm -s clean:mod cjs && pnpm -s cjs:bundle:clean && pnpm -s clean:mod mjs && pnpm -s clean:dir bundle",
"compile-cjs": "pnpm -s cjs:compile",
"compile-mjs": "pnpm -s mjs:compile",
Expand All @@ -140,21 +141,21 @@
"devDependencies": {
"copyfiles": "^2.4.1",
"diff": "^5.2.0",
"eslint": "^9.7.0",
"eslint": "^9.28.0",
"eslint-formatter-unix": "^8.40.0",
"eslint-plugin-jsdoc": "^48.11.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.5",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"rimraf": "^5.0.5",
"terser-webpack-plugin": "^5.3.10",
"typescript": "^5.4.5",
"typescript-eslint": "^8.0.0",
"eslint-plugin-prettier": "^5.4.1",
"husky": "^9.1.7",
"lint-staged": "^15.5.2",
"prettier": "^3.5.3",
"rimraf": "^5.0.10",
"terser-webpack-plugin": "^5.3.14",
"typescript": "^5.8.3",
"typescript-eslint": "^8.33.1",
"typescript-tools": "^0.3.1",
"webpack": "^5.91.0",
"webpack": "^5.99.9",
"webpack-cli": "^5.1.4",
"xslt3": "^2.6.0"
"xslt3": "^2.7.0"
},
"lint-staged": {
"ts/**/*.ts": [
Expand All @@ -163,11 +164,11 @@
]
},
"dependencies": {
"@mathjax/mathjax-newcm-font": "0.4.0-beta.8",
"@mathjax/mathjax-newcm-font": "0.4.3-beta.8",
"@xmldom/xmldom": "^0.8.10",
"mhchemparser": "^4.2.1",
"mj-context-menu": "^0.9.1",
"speech-rule-engine": "^5.0.0-alpha.4",
"speech-rule-engine": "5.0.0-alpha.4",
"wicked-good-xpath": "^1.3.0"
}
}
Loading