diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..8fa8535 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,35 @@ +name: Tests + +on: [push] + +jobs: + build: + env: + CMAKE_VERSION: 3.14.7 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04] + python: [3.6, 3.7, 3.8] + steps: + - uses: actions/checkout@v1 + - name: Cache .tox + uses: actions/cache@v1 + with: + path: .tox + key: ${{ runner.OS }}-tox-${{ hashFiles('poetry.lock') }} + restore-keys: | + ${{ runner.OS }}-tox- + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + curl -sSL https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz | tar xz + python -m pip install --upgrade setuptools pip wheel + python -m pip install poetry tox-gh-actions + - name: Test with tox + run: | + export PATH=$GITHUB_WORKSPACE/cmake-$CMAKE_VERSION-Linux-x86_64/bin:$PATH + tox diff --git a/tox.ini b/tox.ini index f1b990c..7c68660 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,12 @@ isolated_build = True skipsdist = True envlist = py36, py37, py38, lint +[gh-actions] +python = + 3.6: py36 + 3.7: py37, lint + 3.8: py38 + [testenv] whitelist_externals = poetry skip_install = true