Repository: pypa/pyproject-hooks (language: python)

Issue:
Move CI off Travis?
I see that the PSF is paying for the Travis '2 concurrent' plan, and this repo is one of several using that. I don't have a philosophical objection to paying for things if they're valuable, but there are plenty of CI services which offer more than 2 concurrent builds for free, so we could have faster CI and leave Travis time for projects which might be harder to migrate.

Github actions is the currently trendy option, and seems to work well for the most part. But I'm open to using other services so long as they're reasonably snappy and not too much work to maintain.


Discussion / hints:
Let's do Github Actions.

Fix patch:
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 355f720..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-language: python
-
-python:
-- &latest_py3 3.9
-- 3.8
-- 3.7
-- 3.6
-- 3.5
-- 3.4
-- 2.7
-
-env:
-- TOXENV=python
-
-jobs:
-  fast_finish: True
-  include:
-  - stage: deploy
-    if: tag IS present
-    python: *latest_py3
-    before_script: skip
-    env:
-    - FLIT_USERNAME=__token__
-    # FLIT_PASSWORD
-    - secure: "DTuasBqocwWziNCZ9oNdHdThD5b+Kbfv+4Loi2sW6zdZZnanHRantUg9jMQHEWS8SwFgvjsUlIjcjgALGeDV3Ya+ACm0KcsCiGCHYcG7XtYjKmIfXhQ1c6/YTAMi0z/aXjmXttFjwNySGQ6eXSrqMGs3m44zuVV3BSCpW9jLezmGiXltxKfxUCePxMrpFr66CKD3/Js3xQxUYp5MP50qz3FTASURSGivw2cEeuMJy+PtHahhqAjpq13SPMZuMshZGy2t3uP3qf91edMqxZ/sVf803fBbqZL+MEOmT1mTx5ZTZBXdoCUKWydfEbF5jclpvdSc9SNa3rX3sGh0yhcHPQUdyO4BJuERxhyqs7FWs8hJBp40bDkaX/QDXHQiCidO6Ayrm7c75aA+OkxU8suxFDBsF4gRzqkejL3E8wz26Ye7IfEwoKYbUw0S9aHzwwmJZWNgM0QhdP7nDbUVIGYkjPmgNc8HHmkMyPu0WbwiwatDv16pR2Mvk2fjhuP5McUeHmrI57UGyVnxq8JbUjD11G0RW4XqWoqybWSYhHTHFORr2OjodJsprUN+dFzKyVmwPE60yr3Ve0H4roM/W98wh4S7EqRn4rJt1NqC8q8ZRTe2D0bb5ancPYCe+lQcvgO2YDNzDh8kucGON9fEgSFZ9mVG0Fa1UG3EvXJ3K7FjbyA="
-    - TOX_TESTENV_PASSENV="FLIT_USERNAME FLIT_PASSWORD"
-    - TOXENV=release
-    script: tox
-
-cache: pip
-
-install:
-- pip install tox tox-venv
-
-script: tox


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..e7ebc1c
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,50 @@
+name: Tests
+
+on: [push, pull_request]
+
+jobs:
+  tests:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
+
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v2
+
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: Install Tox
+      run: |
+        pip install tox tox-venv
+
+    - name: Run tests
+      run: tox -e python
+
+  publish:
+    runs-on: ubuntu-latest
+    needs: tests
+    if: ${{ startsWith(github.ref, 'refs/tags/') }}
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Set up Python 3.9
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.9
+
+      - name: Install Tox
+        run: |
+          pip install tox tox-venv
+
+      - name: Publish to PyPI
+        run: tox -e release
+        env:
+          FLIT_USERNAME: __token__
+          FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
+          TOX_TESTENV_PASSENV: "FLIT_USERNAME FLIT_PASSWORD"