Merge pull request #190 from TrustNXT/dependabot/npm_and_yarn/typescr… #478
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mocha Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
# `Mocha`-based tests | |
run-mocha: | |
name: Run mocha test runner | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Checkout Test Files | |
id: checkout-test-files | |
uses: actions/checkout@v4 | |
with: | |
repository: c2pa-org/public-testfiles | |
path: ./tests/fixtures/public-testfiles | |
- name: Setup Node.js | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version: 22 | |
- name: Install Dependencies | |
id: npm-ci | |
run: npm ci | |
- name: Run Mocha Tests | |
id: mocha-tests | |
run: npx mocha --reporter mocha-ctrf-json-reporter --reporter-options outputDir=. 'tests/**/*.test.ts' | |
- name: Generate CTRF annotations | |
id: ctrf-annotations | |
run: npx github-actions-ctrf ctrf-report.json | |
if: always() |