Skip to content

Commit a8c5295

Browse files
authored
Add Github actions (#87)
* Add Github actions * Try using a custom container * Use container selectively * Pin specific versions * Ignore SSL warnings for Python3.5 * Remove Python 2 build * Remove EOL Python versions * Use SA 1.x for tests * Refine supported versions * Fix coveralls * Collect all coverage properly * Fix build matrix * Use standard coveralls steps * Install coveralls * Add Github Actions badge * Remove Travis CI config * Remove unused field * Update changelog * Ignore aider files
1 parent 6b751fb commit a8c5295

File tree

7 files changed

+76
-42
lines changed

7 files changed

+76
-42
lines changed

.coveragerc

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[run]
2+
relative_files = True
13
[report]
24
omit =
35
*/python?.?/*

.github/workflows/run-tests.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
strategy:
15+
matrix:
16+
python-version:
17+
- "3.6"
18+
- "3.7"
19+
sqlalchemy-version:
20+
- "1.0.0"
21+
- "1.1.0"
22+
- "1.2.0"
23+
- "1.3.0"
24+
include:
25+
- os: ubuntu-20.04
26+
python-version: "3.6"
27+
- os: ubuntu-22.04
28+
python-version: "3.7"
29+
30+
runs-on: ${{ matrix.os }}
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install SQLAlchemy~=${{ matrix.sqlalchemy-version }}
41+
pip install -r requirements.txt -r requirements-test.txt coveralls
42+
- name: Lint with flake8
43+
run: |
44+
# stop the build if there are Python syntax errors or undefined names
45+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
46+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
47+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
48+
- name: Test with nose
49+
run: |
50+
python setup.py nosetests
51+
- name: Upload coverage data
52+
run: coveralls
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
COVERALLS_PARALLEL: true
56+
57+
coveralls_finish:
58+
name: Finalize coverage
59+
needs: test
60+
runs-on: ubuntu-latest
61+
container: python:3-slim
62+
steps:
63+
- name: Install coveralls
64+
run: pip3 install --upgrade coveralls
65+
- name: Finished
66+
run: coveralls --finish
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ __pycache__
2626
_build
2727
.ropeproject
2828
_themes
29+
.aider.*

.travis.yml

-37
This file was deleted.

CHANGES.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
0.2.6 (2020-XX-XX)
22
==================
33

4-
see issue #63
4+
see issue #63 & #87
55

66
- Support for joined-table inheritance
7+
- Restrict to SQLA 1.0 - 1.3
78

89
0.2.5 (2019-07-23)
910
==================
@@ -12,7 +13,6 @@ see issue #64
1213

1314
- Added similar `django_mptt` methods `get_siblings` and `get_children`
1415

15-
1616
0.2.4 (2018-12-14)
1717
==================
1818

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ License
271271

272272
The project is licensed under the MIT license.
273273

274-
.. |Build Status| image:: https://travis-ci.org/uralbash/sqlalchemy_mptt.svg?branch=master
275-
:target: https://travis-ci.org/uralbash/sqlalchemy_mptt
274+
.. |Build Status| image:: https://github.com/uralbash/sqlalchemy_mptt/actions/workflows/run-tests.yml/badge.svg?branch=master
275+
:target: https://github.com/uralbash/sqlalchemy_mptt/actions/workflows/run-tests.yml
276276
.. |Coverage Status| image:: https://coveralls.io/repos/uralbash/sqlalchemy_mptt/badge.png
277277
:target: https://coveralls.io/r/uralbash/sqlalchemy_mptt
278278
.. |IRC Freenode| image:: https://img.shields.io/badge/irc-freenode-blue.svg

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SQLAlchemy>=1.0.0
1+
SQLAlchemy>=1.0.0,<1.4

0 commit comments

Comments
 (0)