Setup CI
This commit is contained in:
35
.github/workflows/tests.yml
vendored
Normal file
35
.github/workflows/tests.yml
vendored
Normal file
@@ -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
|
||||||
6
tox.ini
6
tox.ini
@@ -3,6 +3,12 @@ isolated_build = True
|
|||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = py36, py37, py38, lint
|
envlist = py36, py37, py38, lint
|
||||||
|
|
||||||
|
[gh-actions]
|
||||||
|
python =
|
||||||
|
3.6: py36
|
||||||
|
3.7: py37, lint
|
||||||
|
3.8: py38
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = poetry
|
whitelist_externals = poetry
|
||||||
skip_install = true
|
skip_install = true
|
||||||
|
|||||||
Reference in New Issue
Block a user