Switch CI from Travis to GitHub Actions (#41)
Fix #39.
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..470c010
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,70 @@
+name: test
+
+on:
+ push:
+ branches:
+ - master
+ - "test-me-*"
+ tags:
+ - "*"
+ pull_request:
+ branches:
+ - master
+
+# Set permissions at the job level.
+permissions: {}
+
+jobs:
+ lint:
+ runs-on: ubuntu-20.04
+ timeout-minutes: 10
+ permissions:
+ contents: read
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: 3.11
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install tox
+
+ - name: Lint
+ run: tox -e lint
+
+ test:
+ runs-on: ubuntu-20.04
+ timeout-minutes: 10
+ permissions:
+ contents: read
+
+ strategy:
+ fail-fast: false
+ matrix:
+ python: [
+ "3.7.1",
+ "3.7",
+ "3.8",
+ "3.9",
+ "3.10",
+ "3.11",
+ ]
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python }}
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install tox
+
+ - name: Test
+ run: tox -e py
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index f1f4b7b..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-language: python
-# cache package wheels (1 cache per python version)
-cache: pip
-# newer python versions are available only on xenial (while some older only on trusty) Ubuntu distribution
-dist: trusty
-
-env:
- TOXENV=py
-
-jobs:
- include:
- - python: 3.5.0
- - python: 3.5.1
- - python: 3.5.2
- - python: 3.5.3
- - python: 3.5
- - python: 3.6.0
- - python: 3.6.1
- - python: 3.6.2
- - python: 3.6
- dist: xenial
- - python: 3.7.0
- dist: xenial
- - python: 3.7.1
- dist: xenial
- - python: 3.7
- dist: xenial
- - python: 3.8
- dist: xenial
- - python: 3.9
- dist: xenial
-
- - name: "check code style with flake8"
- python: 3.7
- dist: xenial
- env:
- - TOXENV=lint
-
-install:
-- pip install -U pip setuptools
-- pip install -U tox
-- tox --notest
-
-script:
-- tox
diff --git a/tox.ini b/tox.ini
index 0a61ca8..9f64a32 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,7 +9,7 @@
[testenv:lint]
description = check the code style
-basepython = python3.7
+basepython = python3
deps = flake8
commands = flake8 -j0 {posargs}