Skip to content
Open
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
84 changes: 84 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# This workflow will do a clean install of node dependencies, build the source
# code and run tests in block on the latest version of node.

name: test

on:
push:
branches:
- develop
pull_request:
types: [closed]
branches:
- develop

jobs:
setup:
runs-on: ubuntu-latest
name: Compile SRE with locales
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'latest'

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

- name: Setup Speech Rule Engine
run: |
pnpm -r i
pnpm build
cd testsuite
pnpm compile

- name: Upload build
uses: actions/upload-artifact@v4
with:
name: sre-library
path: |
lib
js
package.json
testsuite/js
testsuite/tests

test:
needs: setup
runs-on: ubuntu-latest
name: SRE jests tests for all
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Downloading the build
uses: actions/download-artifact@v4
with:
name: sre-library

- name: Set up tests
run: |
pnpm -r i --ignore-scripts

- name: Run tests for all
run: pnpm test:action tests/actions/ --coverageReporters=json

- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: speech-rule-engine/speech-rule-engine
file: coverage/coverage-final.json
name: codecov-$(date +%Y%m%d)
106 changes: 57 additions & 49 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
name: test

on:
push:
branches:
- develop
pull_request:
branches:
- develop
Expand All @@ -19,10 +16,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'latest'

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

- name: Setup Speech Rule Engine
Expand Down Expand Up @@ -54,10 +56,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'latest'

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

- name: Downloading the build
Expand All @@ -70,47 +77,48 @@ jobs:
pnpm -r i --ignore-scripts

- name: Run tests for ${{ matrix.block }}
run: pnpm test:action tests/actions/${{ matrix.block }}.test.ts --coverageReporters=json

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.block }}
path: coverage/coverage-final.json

combine-coverage:
needs: test
runs-on: ubuntu-latest
name: Combine Coverage Reports
steps:
- uses: actions/checkout@v4

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

- name: Install merge tool
run: pnpm add -g nyc

- name: Download all coverage artifacts
uses: actions/download-artifact@v4
with:
path: coverage-artifacts

- name: Merge coverage reports
run: |
mkdir -p combine
cd coverage-artifacts
for i in coverage-*; do cp $i/coverage-final.json ../combine/$i.json; done
cd ..
nyc merge ./combine/ coverage.json

- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: speech-rule-engine/speech-rule-engine
file: coverage.json
name: codecov-$(date +%Y%m%d)
run: pnpm test:action tests/actions/${{ matrix.block }}.test.ts
## --coverageReporters=json

# - name: Upload coverage artifact
# uses: actions/upload-artifact@v4
# with:
# name: coverage-${{ matrix.block }}
# path: coverage/coverage-final.json

# combine-coverage:
# needs: test
# runs-on: ubuntu-latest
# name: Combine Coverage Reports
# steps:
# - uses: actions/checkout@v4

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

# - name: Install merge tool
# run: pnpm add -g nyc

# - name: Download all coverage artifacts
# uses: actions/download-artifact@v4
# with:
# path: coverage-artifacts

# - name: Merge coverage reports
# run: |
# mkdir -p combine
# cd coverage-artifacts
# for i in coverage-*; do cp $i/coverage-final.json ../combine/$i.json; done
# cd ..
# nyc merge ./combine/ coverage.json

# - name: Upload to Codecov
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# slug: speech-rule-engine/speech-rule-engine
# file: coverage.json
# name: codecov-$(date +%Y%m%d)
2 changes: 1 addition & 1 deletion l10n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"@types/json-diff": "^1.0.3",
"json-diff": "^1.0.6",
"ts-patch": "^3.3.0",
"typescript-transform-paths": "^3.5.5"
"typescript-transform-paths": "^3.5.6"
}
}
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,23 @@
"devDependencies": {
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@types/node": "^25.0.2",
"@typescript-eslint/eslint-plugin": "^8.49.0",
"@typescript-eslint/parser": "^8.49.0",
"@typescript-eslint/eslint-plugin": "^8.53.0",
"@typescript-eslint/parser": "^8.53.0",
"circular-dependency-plugin": "^5.2.2",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-formatter-unix": "^9.0.1",
"eslint-plugin-jsdoc": "^61.5.0",
"eslint-plugin-jsdoc": "^61.7.1",
"json-minify": "1.0.0",
"prettier": "^3.7.4",
"rimraf": "^6.1.2",
"terser-webpack-plugin": "5.3.16",
"ts-loader": "9.5.4",
"ts-prune": "^0.10.3",
"tsconfig-paths-webpack-plugin": "^4.2.0",
"typedoc": "^0.28.15",
"typedoc": "^0.28.16",
"typescript": "5.9.3",
"webpack": "5.103.0",
"webpack": "5.104.1",
"webpack-cli": "^6.0.1"
},
"files": [
Expand Down
Loading
Loading