Skip to content

Commit 108744b

Browse files
committed
Drop Travis and Appveyor, do everything on GH Actions
1 parent edd3627 commit 108744b

4 files changed

Lines changed: 80 additions & 129 deletions

File tree

.appveyor.yml

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

.github/workflows/main.yml

Lines changed: 80 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
# :Author: Martin Thoma <info@martin-thoma.de>
55
# :License: MIT License
66
# :Copyright: © 2020 Martin Thoma
7-
# :Copyright: © 2020 Lele Gaifax
7+
# :Copyright: © 2020, 2021 Lele Gaifax
88
#
99

1010
# For more information see:
1111
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
12+
# and
13+
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
1214

13-
name: Python Unittests
15+
name: Build, test and upload to PyPI
1416

1517
on:
1618
push:
@@ -19,26 +21,99 @@ on:
1921
branches: [ master ]
2022

2123
jobs:
22-
build:
23-
24+
tests:
25+
name: All tests, on current Python
2426
runs-on: ubuntu-latest
27+
2528
strategy:
2629
matrix:
27-
python-version: [3.6, 3.7, 3.8, 3.9]
30+
python-version: [3.9]
2831

2932
steps:
3033
- uses: actions/checkout@v2
3134
with:
3235
submodules: recursive
36+
3337
- name: Set up Python ${{ matrix.python-version }}
3438
uses: actions/setup-python@v2
3539
with:
3640
python-version: ${{ matrix.python-version }}
41+
3742
- name: Install dependencies
3843
run: |
3944
python -m pip install --upgrade pip
4045
pip install -r requirements-test.txt
4146
pip install .
47+
4248
- name: Test with pytest
4349
run: |
4450
pytest tests
51+
52+
- name: Test memory leaks
53+
uses: deadsnakes/action@v2.1.1
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
debug: true
57+
run: |
58+
pytest tests
59+
60+
- name: Execute doctest
61+
run: |
62+
make -C docs doctest -e PYTHON=$(which python3)
63+
64+
build_wheels:
65+
name: Build wheels on ${{ matrix.os }}
66+
runs-on: ${{ matrix.os }}
67+
strategy:
68+
matrix:
69+
os:
70+
- ubuntu-20.04
71+
- macOS-10.15
72+
- windows-2019
73+
74+
steps:
75+
- name: Checkout sources
76+
uses: actions/checkout@v2
77+
with:
78+
submodules: true
79+
80+
- name: Install Python
81+
uses: actions/setup-python@v2
82+
with:
83+
python-version: '3.8'
84+
85+
- name: Build wheels
86+
uses: pypa/cibuildwheel@v1.11.1
87+
env:
88+
CIBW_TEST_REQUIRES: "pytest pytest-benchmark pytz"
89+
CIBW_TEST_COMMAND="pytest {project}/tests"
90+
CIBW_SKIP="cp2* cp33* cp34* cp35* pp*"
91+
92+
- name: Upload artifacts
93+
uses: actions/upload-artifact@v2
94+
with:
95+
path: ./wheelhouse/*.whl
96+
97+
upload_wheels:
98+
name: Upload wheels
99+
needs: build_wheels
100+
runs-on: ubuntu-latest
101+
102+
steps:
103+
- uses: actions/download-artifact@v2
104+
with:
105+
name: artifact
106+
path: dist
107+
108+
- name: Upload to Test PyPI
109+
uses: pypa/gh-action-pypi-publish@master
110+
with:
111+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
112+
repository_url: https://test.pypi.org/legacy/
113+
114+
# upload to PyPI on every tag starting with 'v'
115+
- name: Upload to PyPI
116+
uses: pypa/gh-action-pypi-publish@master
117+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
118+
with:
119+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitlab-ci.yml

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

.travis.yml

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

0 commit comments

Comments
 (0)