From 9104e168edd98a5107d50bd5119c5225eeeac7e1 Mon Sep 17 00:00:00 2001 From: Sergei Lebedev Date: Mon, 11 Oct 2021 16:59:07 +0100 Subject: [PATCH] Migrated to GitHub Actions --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 9 --------- requirements_dev.txt | 1 + 3 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5679f21 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: ci + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + build-and-test: + name: "Python ${{ matrix.python-version }}" + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "pypy-3.7"] + + steps: + - uses: "actions/checkout@v2" + - uses: "actions/setup-python@v2" + with: + python-version: "${{ matrix.python-version }}" + - name: "Install dependencies" + run: | + set -xe + python -m pip install -r requirements_dev.txt + shell: bash + - name: "Build" + run: | + set -xe + python -VV + python setup.py sdist + pip wheel --verbose --no-deps --no-clean dist/pyte*.tar.gz + pip install pyte*.whl + shell: bash + - name: "Run tests" + run: | + set -xe + # Change directory to avoid importing pyte from repo root. + pushd tests + python -m pytest -vv --pyargs . + popd + shell: bash diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b1f7881..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: python -python: - - "2.7" - - "3.5" - - "3.6" - - "pypy" -install: - - travis_retry pip install wcwidth -script: python setup.py test diff --git a/requirements_dev.txt b/requirements_dev.txt index 64ce9d2..c1ee84d 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,3 +1,4 @@ pytest pyperf == 1.7.1 wcwidth +wheel