From 0d9297d844a4ef41385d77a9af8879fb66cde588 Mon Sep 17 00:00:00 2001 From: goanpeca Date: Tue, 21 Jul 2020 18:13:36 -0500 Subject: [PATCH] Add CI with github --- .github/workflows/tests.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..01d43904 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,45 @@ +name: Linux tests + +on: + push: + branches: + - master + + pull_request: + branches: + - "*" + +jobs: + linux: + name: Linux py${{ matrix.PYTHON_VERSION }} tests + runs-on: ubuntu-latest + env: + CI: True + PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} + strategy: + fail-fast: false + matrix: + PYTHON_VERSION: ['3.5', '3.6', '3.8'] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cache pip + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-py-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('**/setup.py') }} + - name: Setup python + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.PYTHON_VERSION }} + - name: Install python dependencies + run: | + pip install setuptools pip --upgrade + pip install -v -e ".[test]" + - name: Show python environment + run: | + python --version + python -m pip list + - name: Run python tests + run: | + pytest . --tb=long -svv