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