Skip to content

Commit cb34223

Browse files
authored
Merge pull request #117 from pbugnion/use-github-action
Initial commit for github action
2 parents 040a9b6 + bcd4c65 commit cb34223

File tree

7 files changed

+68
-35
lines changed

7 files changed

+68
-35
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
on: [push]
3+
4+
jobs:
5+
6+
test-python:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 4
10+
matrix:
11+
python-version: [3.5, 3.6, 3.7, 3.8]
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install tox tox-gh-actions
22+
- name: Test with tox
23+
run: tox
24+
25+
test-js:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v1
29+
- name: Set up Node
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: 10.x
33+
- name: Install package
34+
run: npm install
35+
- name: Lint
36+
run: npm run prettier:check
37+
- name: Test
38+
run: npm run test

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/pbugnion/jupyterlab-sql.svg?branch=master)](https://travis-ci.org/pbugnion/jupyterlab-sql)
1+
[![Build](https://img.shields.io/github/workflow/status/pbugnion/jupyterlab_sql/Tests)](https://github.com/pbugnion/jupyterlab-sql/actions)
22
[![Latest version released on PyPi](https://img.shields.io/pypi/v/jupyterlab-sql.svg?style=flat-square&label=version)](https://pypi.python.org/pypi/jupyterlab-sql)
33

44
# jupyterlab-sql

__tests__/src/api/query.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ namespace Fixtures {
1717
responseData: {
1818
hasRows: true,
1919
keys: ['key1', 'key2'],
20-
rows: [['a', 'b'], ['c', 'd']]
20+
rows: [
21+
['a', 'b'],
22+
['c', 'd']
23+
]
2124
}
2225
};
2326

__tests__/src/api/tableStructure.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ namespace Fixtures {
1717
responseData: {
1818
hasRows: true,
1919
keys: ['key1', 'key2'],
20-
rows: [['a', 'b'], ['c', 'd']]
20+
rows: [
21+
['a', 'b'],
22+
['c', 'd']
23+
]
2124
}
2225
};
2326

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def run(self):
179179
name="jupyterlab_sql",
180180
version=VERSION,
181181
packages=setuptools.find_packages(),
182-
install_requires=["jupyterlab", "sqlalchemy", "jsonschema>=3"],
182+
install_requires=["jupyterlab", "sqlalchemy", "jsonschema"],
183183
cmdclass={
184184
"jsextension": BuildJsExtension,
185185
"build_py": build_js_extension(build_py),

tox.ini

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
11
[tox]
2-
envlist = py35, py36, py37
2+
envlist = py35, py36, py37, py38, flake8, black
33

44
[testenv]
55
sitepackages = False
66
deps =
77
pytest
88
commands = pytest {posargs}
9+
10+
[testenv:flake8]
11+
skip_install = True
12+
deps =
13+
flake8
14+
commands = flake8 setup.py jupyterlab_sql
15+
16+
[testenv:black]
17+
skip_install = True
18+
deps =
19+
black
20+
commands = black --check setup.py jupyterlab_sql
21+
22+
[gh-actions]
23+
python =
24+
3.5: py35
25+
3.6: py36, flake8, black
26+
3.7: py37
27+
3.8: py38

0 commit comments

Comments
 (0)