From 7d5a310fe0825d55a02378179b3d4b0907ca0e20 Mon Sep 17 00:00:00 2001 From: jbloom Date: Tue, 6 Feb 2024 15:44:01 -0800 Subject: [PATCH] test via GitHub actions, not Travis --- .github/workflows/test.yaml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 1 + CHANGELOG.rst | 1 + README.rst | 4 ++-- 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..22a0996 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,35 @@ +name: Run tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: install python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: install package and dependencies + run: pip install -e . && pip install -r test_requirements.txt + + - name: lint code with ruff + run: ruff check . + + - name: check code format with black + run: black --check . + + - name: test code with `pytest` + run: pytest diff --git a/.gitignore b/.gitignore index ea17540..ad657ff 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ _* !.gitignore +!.github !.travis.yml !.flake8 !.nojekyll diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4d3af20..24ceefe 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,7 @@ The format is based on `Keep a Changelog `_. - Lint with ``ruff`` rather than ``flake8`` - Add ``pyarrow`` as dependency as required by ``pandas``. - Tweaks to work with new versions of ``pandas`` and ``plotnine`` +- Test with GitHub Actions rather than Travis CI 1.4.3 ----- diff --git a/README.rst b/README.rst index 48f9410..fac7c3b 100644 --- a/README.rst +++ b/README.rst @@ -5,8 +5,8 @@ dms_variants .. image:: https://img.shields.io/pypi/v/dms_variants.svg :target: https://pypi.python.org/pypi/dms_variants -.. image:: https://app.travis-ci.com/jbloomlab/dms_variants.svg - :target: https://app.travis-ci.com/github/jbloomlab/dms_variants +.. image:: https://github.com/jbloomlab/dms_variants/actions/workflows/test.yaml/badge.svg + :target: https://github.com/jbloomlab/dms_variants/actions/workflows/test.yaml .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black