From 31bd7065db0e9647f211eb284204a3f9fd55e171 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 9 Mar 2021 19:24:33 -0300 Subject: [PATCH 1/4] check version line --- .github/workflows/tarball-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tarball-tests.yml b/.github/workflows/tarball-tests.yml index 5400a92..33171ca 100644 --- a/.github/workflows/tarball-tests.yml +++ b/.github/workflows/tarball-tests.yml @@ -29,6 +29,7 @@ jobs: shell: bash -l {0} run: | source activate TEST + python setup.py --version pip wheel . -w dist --no-deps check-manifest --verbose twine check dist/* From c09a15448f67f9c2063c66729cb66b1df2cefd89 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 9 Mar 2021 19:24:56 -0300 Subject: [PATCH 2/4] reduce Travis-CI to docs only --- .travis.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 452e1db..57cf5dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,21 +9,8 @@ env: matrix: fast_finish: true include: - - name: "python-3.9 numpy 1.20" - env: PY=3.9 NP=1.20 - - name: "python-3.8 numpy=1.17" - env: PY=3.8 NP=1.17 - - name: "python-3.7" - env: PY=3.7 - - name: "coding_standards" - env: PY=3 - name: "docs" env: PY=3 - - name: "tarball" - env: PY=3 - allow_failures: - - name: "coding_standards" - env: PY=3 before_install: # Install miniconda and create TEST env. @@ -38,30 +25,11 @@ before_install: conda config --set safety_checks disabled conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt source activate TEST - if [[ -n "$NP" ]]; then - conda install numpy=$NP - fi install: - pip install -e . --no-deps --force-reinstall script: - - if [[ $TRAVIS_JOB_NAME == python-* ]]; then - cp -r tests/ /tmp ; - pushd /tmp && pytest -n 2 -rxs --cov=utide tests && popd ; - fi - - - if [[ $TRAVIS_JOB_NAME == 'tarball' ]]; then - python setup.py --version ; - pip wheel . -w dist --no-deps ; - check-manifest --verbose ; - twine check dist/* ; - fi - - - if [[ $TRAVIS_JOB_NAME == 'coding_standards' ]]; then - pytest --flake8 -m flake8 ; - fi - - | if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then set -e From 0c463389dc991035118d56e12eefde4076ebaff9 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 11 Mar 2021 09:47:41 -0300 Subject: [PATCH 3/4] publish on PyPI --- .github/workflows/publish.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..be04e27 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +name: Publish to PyPI + +on: + release: + types: + - published + +jobs: + packages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Get tags + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + shell: bash + + - name: Install build tools + run: | + python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine pytest numpy scipy + + shell: bash + + - name: Build binary wheel + run: python -m build --sdist --wheel . --outdir dist + + - name: CheckFiles + run: | + ls dist + shell: bash + + - name: Test wheels + run: | + cd dist && python -m pip install UTide*.whl + python -m twine check * + shell: bash + + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_PASSWORD }} From 79045d170774813a0222bd62079db0ddfe56ced2 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 11 Mar 2021 10:04:54 -0300 Subject: [PATCH 4/4] leave only docs for later --- .travis.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 57cf5dd..d90af42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,17 +43,3 @@ script: python -m doctr deploy --build-tags --key-path github_deploy_key_wesleybowman_utide.enc --built-docs docs/_build/html . fi fi - -deploy: - skip_cleanup: true - provider: pypi - user: ocefpaf - password: - secure: "n7V/06zaWzAHiAx2YLh6n+glbRKHEdHntw8oOJXQJKQaiDzJR+Be2FANZ4rSof4kkDVUwwqTNzAuVn43BJBt4WdKdh3PWZwhfm4+/lzN1lpwyhK+P/5IUxSynov2JcqzvJtmrGCELEqrULBvrbBbcf9f93NPUr6Id5iA0shKv4w=" - distributions: sdist bdist_wheel - upload_docs: no - on: - repo: wesleybowman/UTide - tags: true - all_branches: master - condition: '$TRAVIS_JOB_NAME == "tarball"'