CI: add Win, OSX, pypy2, pypy3

- also fix docker build
This commit is contained in:
Casper da Costa-Luis 2020-11-15 21:15:13 +00:00
parent 83a6515261
commit 1a2976ae61
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
4 changed files with 32 additions and 14 deletions

View File

@ -6,7 +6,7 @@ on:
- cron: '2 1 * * 6' # M H d m w (Saturdays at 1:02) - cron: '2 1 * * 6' # M H d m w (Saturdays at 1:02)
jobs: jobs:
check: check:
name: Install name: install
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -14,10 +14,28 @@ jobs:
with: with:
python-version: '3.x' python-version: '3.x'
- run: pip install . - run: pip install .
test-os:
strategy:
matrix:
python: [2.7, 3.7]
os: [macos-latest, windows-latest]
name: py${{ matrix.python }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: pip install -U tox
- run: tox -e py${PYVER/./}
env:
PYVER: ${{ matrix.python }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
test: test:
strategy: strategy:
matrix: matrix:
python: [2.7, 3.5, 3.6, 3.7, 3.8] python: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3]
name: py${{ matrix.python }} name: py${{ matrix.python }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -28,9 +46,12 @@ jobs:
- run: pip install -U tox - run: pip install -U tox
- name: tox - name: tox
run: | run: |
tox -e py${PYVER/./} if [[ "$PYVER" == py* ]]; then
if [[ "$PYVER" == "3.7" ]]; then tox -e $PYVER
elif [[ "$PYVER" == "3.7" ]]; then
tox -e tf-no-keras tox -e tf-no-keras
else
tox -e py${PYVER/./}
fi fi
env: env:
PYVER: ${{ matrix.python }} PYVER: ${{ matrix.python }}
@ -41,8 +62,8 @@ jobs:
with: with:
parallel: true parallel: true
finish: finish:
name: Coverage name: pytest cov
needs: test needs: [test, test-os]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Coveralls Finished - name: Coveralls Finished
@ -50,8 +71,7 @@ jobs:
with: with:
parallel-finished: true parallel-finished: true
deploy: deploy:
name: Deploy needs: [check, test, test-os]
needs: [check, test]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -1,5 +1,4 @@
FROM python:3.7-alpine FROM python:3.7-alpine
COPY setup.py tqdm/
COPY dist/*.whl . COPY dist/*.whl .
RUN pip install -U $(ls *.whl) && rm *.whl RUN pip install -U $(ls *.whl) && rm *.whl
ENTRYPOINT ["tqdm"] ENTRYPOINT ["tqdm"]

View File

@ -109,9 +109,8 @@ snapcraft.yaml: .meta/.snapcraft.yml
-e 's/{description}/https:\/\/tqdm.github.io/g' > "$@" -e 's/{description}/https:\/\/tqdm.github.io/g' > "$@"
.dockerignore: .gitignore .dockerignore: .gitignore
cat $^ > "$@" echo '*' > $@
echo ".git" > "$@" echo '!dist/*.whl' >> $@
git clean -xdn | sed -nr 's/^Would remove (.*)$$/\1/p' >> "$@"
distclean: distclean:
@+make coverclean @+make coverclean

View File

@ -5,7 +5,7 @@
[tox] [tox]
# deprecation warning: py{26,32,33,34} # deprecation warning: py{26,32,33,34}
envlist = py{26,27,33,34,35,36,37,38,py,py3}, tf-no-keras, perf, flake8, setup.py envlist = py{26,27,33,34,35,36,37,38,py2,py3}, tf-no-keras, perf, flake8, setup.py
[coverage] [coverage]
deps = deps =
@ -46,7 +46,7 @@ deps =
commands = {[extra]commands} commands = {[extra]commands}
allowlist_externals = {[extra]allowlist_externals} allowlist_externals = {[extra]allowlist_externals}
# no cython/numpy/pandas for py{py,py3,26,33,34} # no cython/numpy/pandas for py{py2,py3,26,33,34}
[testenv:py26] [testenv:py26]
deps = deps =