commit:     8d09cb1da12366a0420341be5ab11bed987eb413
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  2 00:43:19 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jan  2 02:45:30 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8d09cb1d

.travis.yml: convert to github action

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++
 .travis.yml              | 26 --------------------------
 tox.ini                  |  9 +++++++++
 3 files changed, 52 insertions(+), 26 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..2ec4c57aa
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,43 @@
+name: CI
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version:
+        - '3.6'
+        - '3.7'
+        - '3.8'
+        - '3.9'
+        - '3.10.0-alpha.3'
+        - 'pypy-3.6'
+
+    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 python dependencies
+      run: |
+        set -xe
+        sudo apt-get install -y --no-install-recommends libxslt-dev 
libxml2-dev zstd
+        python -VV
+        python -m site
+        python -m pip install --upgrade pip
+        python -m pip install tox tox-gh-actions
+    - name: Test ./setup.py install --root=/tmp/install-root
+      run: |
+        printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg
+        ./setup.py install --root=/tmp/install-root
+    - name: Run tox targets for ${{ matrix.python-version }}
+      run: |
+        tox -vv

diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 297286ce0..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-dist: focal
-language: python
-python:
-    - 3.6
-    - 3.7
-    - 3.8
-    - 3.9
-    - 3.10-dev
-    - pypy3
-
-# command to install dependencies
-before_install:
-    # Use "dist: bionic" to get a zstd with --long support.
-    - sudo apt-get -y install zstd
-install:
-    - pip install tox
-
-script:
-    - printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg
-    - ./setup.py install --root=/tmp/install-root
-    - if [[ ${TRAVIS_PYTHON_VERSION/-dev/} == ?.? ]]; then
-        TOX_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION/-dev/};
-        tox -e py${TOX_PYTHON_VERSION/./};
-      else
-        tox -e ${TRAVIS_PYTHON_VERSION};
-      fi

diff --git a/tox.ini b/tox.ini
index 8aabbd2ce..27b2206d6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,6 +2,15 @@
 envlist = py36,py37,py38,py39,py310,pypy3
 skipsdist = True
 
+[gh-actions]
+python =
+    3.6: py36
+    3.7: py37
+    3.8: py38
+    3.9: py39
+    3.10: py310
+    pypy-3.6: pypy3
+
 [testenv]
 deps =
        pylint

Reply via email to