diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36a11779..175bd208 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: - cron: '2 1 * * 6' # M H d m w (Saturdays at 1:02) jobs: check: - name: Install + name: install runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -14,10 +14,28 @@ jobs: with: python-version: '3.x' - 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: strategy: 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 }} runs-on: ubuntu-latest steps: @@ -28,9 +46,12 @@ jobs: - run: pip install -U tox - name: tox run: | - tox -e py${PYVER/./} - if [[ "$PYVER" == "3.7" ]]; then + if [[ "$PYVER" == py* ]]; then + tox -e $PYVER + elif [[ "$PYVER" == "3.7" ]]; then tox -e tf-no-keras + else + tox -e py${PYVER/./} fi env: PYVER: ${{ matrix.python }} @@ -41,8 +62,8 @@ jobs: with: parallel: true finish: - name: Coverage - needs: test + name: pytest cov + needs: [test, test-os] runs-on: ubuntu-latest steps: - name: Coveralls Finished @@ -50,8 +71,7 @@ jobs: with: parallel-finished: true deploy: - name: Deploy - needs: [check, test] + needs: [check, test, test-os] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 4a7806ce..de690907 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM python:3.7-alpine -COPY setup.py tqdm/ COPY dist/*.whl . RUN pip install -U $(ls *.whl) && rm *.whl ENTRYPOINT ["tqdm"] diff --git a/Makefile b/Makefile index 3e2bfda3..0e479d23 100644 --- a/Makefile +++ b/Makefile @@ -109,9 +109,8 @@ snapcraft.yaml: .meta/.snapcraft.yml -e 's/{description}/https:\/\/tqdm.github.io/g' > "$@" .dockerignore: .gitignore - cat $^ > "$@" - echo ".git" > "$@" - git clean -xdn | sed -nr 's/^Would remove (.*)$$/\1/p' >> "$@" + echo '*' > $@ + echo '!dist/*.whl' >> $@ distclean: @+make coverclean diff --git a/tox.ini b/tox.ini index e3ea6496..97c83f01 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ [tox] # 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] deps = @@ -46,7 +46,7 @@ deps = commands = {[extra]commands} 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] deps =