From 7a470a85b9cbc878bfc3f87f6e7c603b1a169a74 Mon Sep 17 00:00:00 2001 From: ATTY Lionel Date: Thu, 21 Jan 2021 11:00:41 +0100 Subject: [PATCH] ci: add github-action support for utests --- .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++++++++++ tox.ini | 13 ++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4e05f26 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +name: Test + +on: + pull_request: + push: + branches: + - master + - develop + +jobs: + test: + name: Test + runs-on: ${{ matrix.platform }} + strategy: + max-parallel: 4 + matrix: + platform: [ubuntu-latest] + python-version: [2.7, 3.5, 3.6, 3.7, pypy3] + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + # https://github.com/marketplace/actions/setup-ffmpeg + - name: Install & setup FFMPEG + uses: FedericoCarboni/setup-ffmpeg@v1-beta + # https://github.com/ymyzk/tox-gh-actions + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Test with tox + run: tox + env: + PLATFORM: ${{ matrix.platform }} diff --git a/tox.ini b/tox.ini index 1e3ba53..93cb03a 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,19 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. +[gh-actions] +python = + 2.7: py27 + 3.5: py35 + 3.6: py36 + 3.7: py37 + pypy3: pypy + [tox] -envlist = py27, py34, py35, py36, py37, pypy +skipsdist = True +isolated_build = True +envlist = py27, py35, py36, py37, pypy +skip_missing_interpreters = True [testenv] commands = py.test -vv