Skip to content

Commit d274feb

Browse files
committed
build: remove unused deps and migrate CI
* Switches CI to inveniosoftware/workflows JS test workflow for consistency across packages * Removes unused devDependencies (cheerio, coveralls, expect) * Adds npm overrides for supply chain security and Node 22+ compatibility * Adds MessagePort and MessageChannel to test polyfills for React 18 act() scheduling in JSDOM * Removes redundant `expect` import (provided by Jest)
1 parent f2f1250 commit d274feb

5 files changed

Lines changed: 5145 additions & 5100 deletions

File tree

.github/workflows/js-tests.yml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,38 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright (C) 2020-2024 CERN.
4+
# Copyright (C) 2020 Northwestern University.
5+
# Copyright (C) 2024 Graz University of Technology.
6+
#
7+
# Invenio-RDM-Records is free software; you can redistribute it and/or modify
8+
# it under the terms of the MIT License; see LICENSE file for more details.
9+
110
name: CI
211

312
on:
413
push:
514
branches:
615
- master
16+
- "feature/*"
17+
- "maint-**"
718
pull_request:
819
branches:
920
- master
21+
- "maint-**"
22+
- "feature/*"
1023
schedule:
1124
# * is a special character in YAML so you have to quote this string
12-
- cron: '0 2 * * 5'
25+
- cron: "0 2 * * 5"
1326
workflow_dispatch:
1427
inputs:
1528
reason:
16-
description: 'Reason'
29+
description: "Reason"
1730
required: false
18-
default: 'Manual trigger'
31+
default: "Manual trigger"
1932

2033
jobs:
21-
Tests:
22-
runs-on: ubuntu-latest
23-
24-
strategy:
25-
matrix:
26-
node-version: [22.x, 18.x, 16.x]
27-
28-
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v4
31-
32-
- name: Use Node.js ${{ matrix.node-version }}
33-
uses: actions/setup-node@v4
34-
with:
35-
node-version: ${{ matrix.node-version }}
36-
37-
- name: Install & Build
38-
run: npm ci
39-
40-
- name: Lint
41-
run: npm run lint
42-
43-
- name: Test
44-
run: npm test
45-
46-
- name: Coverage
47-
run: npm test -- --coverage
34+
JS:
35+
uses: inveniosoftware/workflows/.github/workflows/tests-js.yml@master
36+
with:
37+
js-working-directory: ./
38+
node-version: '["22.x", "24.x", "26.x"]'

0 commit comments

Comments
 (0)