Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI configs #33

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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
30 changes: 30 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
node-version: [4.x, 5.x, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x]
python-version: [2.6, 2.7, 3.6, 3.7, 3.8, 3.9, 3.10]
# @TODO 2.6
fail-fast: false
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: python -V && node --version
- run: npm install -d
# - run: npm run build --if-present
- run: npm test
73 changes: 52 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,60 @@
language: python
dist: bionic
os:
- "linux"
env:
- NODE_VERSION="11"
- NODE_VERSION="10"
- NODE_VERSION="9"
- NODE_VERSION="8"
- NODE_VERSION="7.5"
- NODE_VERSION="6.1"
- NODE_VERSION="5.11"
- NODE_VERSION="4.4"
python:
- "3.7-dev"
- "3.6"
- "3.5"
- "3.4"
- "3.3"
- "3.2"
- "2.7"
- "2.6"
jobs:
include:
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="14"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="13"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="12"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="11"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="10"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="9"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="8"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="7.5"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="6.1"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="5.11"
- language: generic
env: PYTHON_VERSION="2.6" NODE_VERSION="4.4"
- os: windows
language: node_js
node_js: 12
env: >-
PATH=/c/Python27:/c/Python27/Scripts:$PATH
NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
before_install:
- env
- echo "WINDOWS!!!"
- choco install python2
- node --version
- python -V
before_install:
- rm -rf ~/.nvm
- git clone https://github.com/creationix/nvm.git ~/.nvm
- source ~/.nvm/nvm.sh
- env
- nvm install $NODE_VERSION
- |
if [ "${PYTHON_VERSION}" == "2.6" ]; then
sudo apt-get update
sudo apt-get install -yq software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update -q
sudo apt-get install -yq python2.6
sudo update-alternatives --install /usr/local/bin/python python /usr/bin/python2.6 0
export PATH="/usr/local/bin:$PATH"
fi
- which python
- which node
- python -V
- node --version
install:
- npm install -d
before_script:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# python-bridge [![Build Status](https://secure.travis-ci.org/Submersible/node-python-bridge.png?branch=master)](http://travis-ci.org/Submersible/node-python-bridge) [![Build Status](https://ci.appveyor.com/api/projects/status/8h64yyve684nn900/branch/master?svg=true)](https://ci.appveyor.com/project/munro/node-python-bridge/branch/master)
# python-bridge [![Build Status](https://github.com/Submersible/node-python-bridge/workflows/test/badge.svg?branch=master)](https://github.com/Submersible/node-python-bridge/actions?query=workflow%3Atest+branch%3Amaster) [![Build Status](https://secure.travis-ci.org/Submersible/node-python-bridge.png?branch=master)](http://travis-ci.org/Submersible/node-python-bridge)

Most robust and simple Python bridge. [Features](#features), and [comparisons](#comparisons) to other Python bridges below, supports Windows.

Expand Down
2 changes: 1 addition & 1 deletion README.ts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# python-bridge [![Build Status](https://secure.travis-ci.org/Submersible/node-python-bridge.png?branch=master)](http://travis-ci.org/Submersible/node-python-bridge) [![Build Status](https://ci.appveyor.com/api/projects/status/8h64yyve684nn900/branch/master?svg=true)](https://ci.appveyor.com/project/munro/node-python-bridge/branch/master)
# python-bridge [![Build Status](https://github.com/Submersible/node-python-bridge/workflows/test/badge.svg?branch=master)](https://github.com/Submersible/node-python-bridge/actions?query=workflow%3Atest+branch%3Amaster) [![Build Status](https://secure.travis-ci.org/Submersible/node-python-bridge.png?branch=master)](http://travis-ci.org/Submersible/node-python-bridge)

Most robust and simple Python bridge. [Features](#features), and [comparisons](#comparisons) to other Python bridges below, supports Windows.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "index.d.ts",
"scripts": {
"lint": "npm run lint:ts",
"lint:ts": "tslint --project tsconfig.json --type-check",
"lint:ts": "tslint --project tsconfig.json",
"test": "npm run lint && npm run test:js && npm run test:ts",
"test:js": "tap test.js",
"test:ts": "tsc --lib ES2015 test_typescript.ts && tap test_typescript.js"
Expand Down
7 changes: 4 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ test('readme', t => {
sys.stdout.write(line)
sys.stdout.flush()
`.then(function () {
fileWriter.end();
fs.readFileAsync(OUTPUT, {encoding: 'utf8'}).then(x => {
t.equal(x.replace(/\r/g, ''), 'hello\nworld\n')
fileWriter.end(function () {
fs.readFileAsync(OUTPUT, {encoding: 'utf8'}).then(x => {
t.equal(x.replace(/\r/g, ''), 'hello\nworld\n')
});
});
});

Expand Down