From f0cb5bbb3d638c8ba07ed657f724467052a849f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Jer=C5=A1e?= Date: Tue, 20 Jul 2021 14:38:55 +0200 Subject: [PATCH] Migrate from Travis to Github Actions --- .github/workflows/ci.yaml | 68 ++++++++++++++++++++++++++++++++++++ .travis.yml | 73 --------------------------------------- docs/CHANGELOG.rst | 4 +++ 3 files changed, 72 insertions(+), 73 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..3fa404f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,68 @@ +name: Resolwe Runtime Utils CI + +on: + push: + branches: + - master + tags: + - "[0-9]+.[0-9]+.[0-9]+*" + + pull_request: + schedule: + - cron: "30 2 * * *" + + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + tox-env: [py36, py37, py38, py39, docs, linters, packaging] + include: + - tox-env: py36 + python-version: 3.6 + - tox-env: py37 + python-version: 3.7 + - tox-env: py38 + python-version: 3.8 + - tox-env: py39 + python-version: 3.9 + - tox-env: linters + python-version: 3.8 + - tox-env: packaging + python-version: 3.8 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip tox + - name: Run Tests + run: > + tox -e ${{ matrix.tox-env }} + + build: + runs-on: ubuntu-20.04 + needs: test + if: "startsWith(github.ref, 'refs/tags')" + + steps: + - uses: actions/checkout@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install build + run: python -m pip install --user build + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fb8776f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,73 +0,0 @@ -# Global Travis CI step definitions that will be used by all jobs unless -# explicitly overriden in the jobs.include matrix. - -language: python -# We need sudo to install packages. -sudo: required -# NOTE: Apparently, Travis CI still hasn't strealined Python 3.7 support so -# one has to resort to using the "unofficial" Ubuntu Xenial Xerus (16.04 LTS) -# build environment and enable the "sudo" mode. -# More details here: -# - https://github.com/travis-ci/travis-ci/issues/9069#issuecomment-425720905 -# - https://github.com/travis-ci/travis-ci/issues/9815 -dist: xenial -python: "3.7" - -before_install: - - sudo apt-get install -y p7zip-full - -install: pip install tox - -script: tox -e $TOX_ENV - -after_success: - - pip install codecov - - codecov -e TOX_ENV - - # Build stages. -jobs: - include: - - stage: test - env: TOX_ENV=py36 - python: "3.6" - - stage: test - env: TOX_ENV=py37 - - stage: test - env: TOX_ENV=docs - before_install: skip - after_success: skip - - stage: test - env: TOX_ENV=linters - before_install: skip - after_success: skip - - stage: test - env: TOX_ENV=packaging - before_install: skip - after_success: skip - - # NOTE: We undo/change all the global Travis CI step definitions to ensure - # building of source and wheel distributions is performed in a clean - # environment. - - stage: release - # Project uses setuptools_scm to determine the version from a SCM tag. - install: pip install setuptools_scm - script: skip - before_install: skip - # NOTE: Due to the way Travis CI currently works, setting - # 'after_success: skip' would also result in skipping the deploy step. - # A work-around is to execute a dummy echo command. - # More info at: https://github.com/travis-ci/travis-ci/issues/8337. - after_success: echo "Skipping..." - deploy: - provider: pypi - user: genialis-bot - password: - secure: "Sy/MbZmSP/TIh8q/gHJjIUF/NpR3Nc1L8HcxvkF7Xn8dYYNS7rAh23ixkSLKefEOdmW5byrWAAJZXhrxdMFGnxsVe4liGVagZUzTMMeUsTxdIf8OJVhfB/N4F1hejWpISRHCmlLhLao50muLzIm2sW+hi4bIo4dV/YUy84WlcEl0D1vhdnSEQJlaA8HbT8CtPLVzchLRWOj/liLt6fN6JkrcB58PXJWFBWH3wf7oIsCiLDpAxeCjw6zHYeejZSfp055MYKZHp0MVRR0S9top7T9CACNI5EdPFopI5uDHK+hW+lCOcHW6/lWtDYNRoQJO3dTU1deve0suzA/J9XKrL5zo3PKQb0sOg4nNJInBNgJSRdJAfoWrbSfkkKyKGqwrZab6IG91JXxPjpW0mULPtEdLcJnAxAZCxFYhY7PLG5yyvjR9UF9pjWv94gzfC8U3lejFcdB497Uj+S2CkLb7naUC49+PxkykrkUqxhohWVQpAWsvOwM5EKoZ+6eTCoyx0/wiSPm7R9W0XwCQbk/TUVBTSHgIKUarFn7FanDbYSPOVEfGtUraGfbwyMqOjfDpZec78/QzU6aSVfbPErxGPVUe64w88vf3fIg87IuQcox7DoXg90yiZnu3kqcKuUlcb5YWNxECvGe219ZXixZsm2VR/3IQe9DONj552/oALNA=" - distributions: sdist bdist_wheel - on: - # Enable deploying tags. By default, Travis CI only deploys from the - # master branch. - tags: true - # Only build releases for tags starting with a Semantic Versioning 2.0 - # compatible version. - if: tag =~ ^\d+\.\d+\.\d+ diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index ae259cb..e78e972 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -15,6 +15,10 @@ Added ----- - Add support for Python 3.9 +Changed +------- +- Migrate from Travis to Github Actions + ================== 3.1.0 - 2021-02-09