From b06e8e46682d8b1a47c95a4ff97594349b2b3c52 Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Thu, 15 Apr 2021 14:11:03 -0700 Subject: [PATCH] Use GitHub Actions as CI, remove Travis CI --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ------------ README.rst | 6 +++--- 3 files changed, 39 insertions(+), 15 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 00000000..fa5461bc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: Tests + +on: + pull_request: + push: + branches: main + +jobs: + test: + name: test w/ Python ${{ matrix.python-version }} + + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ["3.7"] + + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-pip- + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - run: python3 -m pip install -U -r dev-requirements.txt + - run: python3 -m coverage run --branch -m pytest tests/ + - uses: codecov/codecov-action@v1 + if: always() + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 419faf29..00000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: python -cache: pip -python: - - 3.7-dev - # - nightly - -install: - - python3 -m pip install -U -r dev-requirements.txt -script: - - python3 -m coverage run --branch -m pytest tests/ -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.rst b/README.rst index 0c4ea422..77f11e19 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,9 @@ miss-islington ============== -.. image:: https://travis-ci.org/python/miss-islington.svg?branch=master - :target: https://travis-ci.org/python/miss-islington -.. image:: https://codecov.io/gh/python/miss-islington/branch/master/graph/badge.svg +.. image:: https://github.com/python/miss-islington/actions/workflows/ci.yml/badge.svg?event=push + :target: https://github.com/python/miss-islington/actions +.. image:: https://codecov.io/gh/python/miss-islington/branch/main/graph/badge.svg :target: https://codecov.io/gh/python/miss-islington .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black