From 6b702aa785b5e0f6aeccbfd40c914adaf0056b15 Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Tue, 8 Dec 2020 22:14:30 +0100 Subject: [PATCH] Get rid of Travis, move to Github Actions --- .github/workflows/release.yml | 59 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 26 ++++++++------- .travis.yml | 39 ----------------------- 3 files changed, 74 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..060c995 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,59 @@ +name: Test + +on: push + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + max-parallel: 5 + matrix: + python-version: + - 2.7 + - 3.6 + - 3.7 + - 3.8 + - 3.9 + + steps: + - uses: actions/checkout@v1 + + - 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 + pip install tox tox-gh-actions + + - name: Test with tox + run: tox + + release: + runs-on: ubuntu-latest + + needs: test + + steps: + - uses: actions/checkout@master + + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Install pypa/build + run: python -m pip install build --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m build --sdist --wheel --outdir dist/ . + + - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a99f6e2..5e5e740 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: [pull_request] jobs: test: runs-on: ubuntu-latest + strategy: max-parallel: 5 matrix: @@ -16,14 +17,17 @@ jobs: - 3.9 steps: - - uses: actions/checkout@v1 - - 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 - pip install tox tox-gh-actions - - name: Test with tox - run: tox \ No newline at end of file + - uses: actions/checkout@v1 + + - 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 + pip install tox tox-gh-actions + + - name: Test with tox + run: tox \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e52730d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -dist: xenial # required for Python >= 3.7 -language: python -python: -- 3.4 -- 3.6 -- 3.7 -- 3.8 -- 2.7 -- pypy3 -# python-coveralls 5.0 no longer supports python34 -install: pip install tox-travis codeclimate-test-reporter -script: tox -matrix: - allow_failures: - - python: 2.7 - - python: 3.4 - - python: pypy3 - include: - - python: 3.7 - env: TOXENV=typing - - python: 3.8 - env: TOXENV=lint -deploy: - provider: pypi - user: aequitas - password: - secure: Eh5fmN851Kcm3PvWHoLb/UsSjVF2h6xIxYdr8CmgHU5vOJVDgpV4GTs/lIl5Ko/fLMzGY/SSj8NWZWcv/qU4wibiTL0f4et6wAX5E6RS6E3eNtMn5HL1b0JMHgAaZN9RFY9GEw7/KhLg+sI6OaOAXUUTbBYRfTgZD3t2yFoNZR8TqIuQOVhQojngzDDtZS2hXdBciwbOezRsbgLVOWUhXGKKrMyRI88/FXzvyw0srfsHUIoFPosW/PS1Qhm8reoO1eg9TpKUMSZ7K/2kqQ6F2St2j3C0V7CGUnFSZqFS9rrcQKZYcckjKflGAK//C8ai3/vDXX/lIdj6oMBjBdONdVw2xVlReebTAt9Q2JAzHUEu4aFbHUvXkHG5CKJIZBBOP+Ujw9iSZKfwTNb85g0CynXS9EWouqWlii9uWyfzqhloA2+txuRhtEB28bdbIdBlntxWELEXQvqrgd/jOamKNilsnn7Wy6cG3jMEWXr5GsxdGsvw2R2LsFlPd3q6FmbnqKiqD5S3CHh9qEk8tBm/pZu49nMoFIpSpMc2rce8U5Th3DKsPa7gY7pAsHg5ebIB5K0neDildcp0nxIn1BxbFfaZAoDGZT0+cIRAOW4bNqM69B3jOQQOvG3gtsyl0bZHkamUWO2nM5d7SZ5tsSC5+KHV+jPRS5CjdDcXnl4a4H8= - distributions: "sdist bdist_wheel" - on: - tags: true - # python and condition are here to prevent deploying multiple times, which - # would fail: deploy only when running specified python version and empty - # $TOXENV. - python: 3.7 - condition: -z $TOXENV - repo: aequitas/python-rflink -after_success: - - coveralls - - CODECLIMATE_REPO_TOKEN=9c681ab3800c3aa7f96622e4a0018a0ffccabae55adcd2f3ff6cbad32344aac1 codeclimate-test-reporter