From d3b8469e89d02b24cd8824e8c692c52e72820d30 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 7 Oct 2021 23:12:39 -0700 Subject: [PATCH] Move tests to GitHub Actions instead of Travis CI --- .github/workflows/tests.yml | 38 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 22 ---------------------- 2 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..1003f71 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: Tests +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + python-version: + - 3.6 + - 3.7 + - 3.8 + - 3.9 + - "3.10" + with-extension: ["0", "1"] + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install coveralls pytest + python setup.py develop + - name: Run tests + env: + WITHOUT_EXTENSION: ${{ matrix.with-extension }} + run: | + coverage run --source=mwparserfromhell -m pytest + - name: Submit to coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + coveralls diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 36f6240..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -dist: focal -language: python -python: - - 3.6 - - 3.7 - - 3.8 - - 3.9 - - 3.10 -arch: - - amd64 - - ppc64le -install: - - pip install coveralls pytest - - python setup.py develop -script: - - coverage run --source=mwparserfromhell -m pytest -after_success: - - coveralls -env: - matrix: - - WITHOUT_EXTENSION=0 - - WITHOUT_EXTENSION=1