Skip to content

Commit a75fb38

Browse files
committed
Update CI workflows and Node.js test scripts
breaking: increase required node>=20
1 parent 2c88fd1 commit a75fb38

File tree

5 files changed

+63
-54
lines changed

5 files changed

+63
-54
lines changed

.github/workflows/node.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
32

43
name: Node.js CI
54

65
on:
76
push:
8-
branches: [ master ]
7+
branches: [ main ]
98
paths:
109
- 'nodejs/**'
1110
- .github/workflows/node.yml
1211
pull_request:
13-
branches: [ master ]
12+
branches: [ main ]
1413
paths:
1514
- 'nodejs/**'
15+
- .github/workflows/node.yml
1616

17-
jobs:
18-
build:
17+
permissions:
18+
contents: read
1919

20+
jobs:
21+
test:
2022
runs-on: ubuntu-latest
2123

2224
strategy:
2325
matrix:
24-
node-version: [16, 18, 20]
26+
node-version: [ 20, 22, 24 ]
2527

2628
steps:
27-
- uses: actions/checkout@v4
28-
- name: Use Node.js ${{ matrix.node-version }}
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: ${{ matrix.node-version }}
32-
- run: cd nodejs; npm ci
33-
- run: cd nodejs; node test.js dump verbose
29+
- uses: actions/checkout@v6
30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v6
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
- name: Install dependencies
35+
run: cd nodejs && npm install
36+
- name: Run tests
37+
run: cd nodejs && npm run test:verbose

.github/workflows/python.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
32

43
name: Python package
54

65
on:
76
push:
8-
branches: [ master ]
7+
branches: [ main ]
98
paths:
109
- 'python/**'
1110
- .github/workflows/python.yml
1211
pull_request:
13-
branches: [ master ]
12+
branches: [ main ]
1413
paths:
1514
- 'python/**'
15+
- .github/workflows/python.yml
1616

17-
jobs:
18-
build:
17+
permissions:
18+
contents: read
1919

20+
jobs:
21+
test:
2022
runs-on: ubuntu-latest
23+
2124
strategy:
2225
matrix:
23-
python-version: ['3.7', '3.8', '3.9']
26+
python-version: [
27+
'3.10',
28+
'3.11',
29+
'3.12',
30+
'3.13',
31+
'3.14',
32+
]
2433

2534
steps:
26-
- uses: actions/checkout@v2
27-
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v4
29-
with:
30-
python-version: ${{ matrix.python-version }}
31-
- name: Install dependencies
32-
run: |
33-
python -m pip install --upgrade pip
34-
pip install black nose
35-
cd python; pip install -r requirements.txt
36-
- name: Reformat
37-
run: |
38-
cd python; black --check .
39-
- name: Run tests
40-
run: |
41-
cd python; nosetests
35+
- uses: actions/checkout@v6
36+
- name: Set up Python ${{ matrix.python-version }}
37+
uses: actions/setup-python@v6
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install black tox tox-gh
44+
cd python && pip install -r requirements.txt
45+
- name: Run tests
46+
run: cd python && tox
47+
env:
48+
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
49+
- name: Check formatting
50+
run: cd python && black --check .

nodejs/package-lock.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

nodejs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
"license": "MIT",
2020
"main": "./ece.js",
2121
"scripts": {
22-
"test": "node ./test.js"
22+
"test": "node ./test.js",
23+
"test:verbose": "node ./test.js dump verbose"
2324
},
2425
"engines": {
25-
"node": ">=16"
26+
"node": ">=20"
2627
}
2728
}

python/tox.ini

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py27,py34,py35,py38,py39,py310,py311,py312
7+
envlist = py27,py34,py35,py38,py39,py310,py311,py312,py313,py314
8+
9+
[gh]
10+
; Github Action
11+
python =
12+
3.10 = py310
13+
3.11 = py311
14+
3.12 = py312
15+
3.13 = py313
16+
3.14 = py314
817

918
[testenv]
1019
basepython =
@@ -16,6 +25,8 @@ basepython =
1625
py310: python3.10
1726
py311: python3.11
1827
py312: python3.12
28+
py313: python3.13
29+
py314: python3.14
1930
commands =
2031
pytest \
2132
[]

0 commit comments

Comments
 (0)