From 6a5f6e820a22f23206d4a6c3c026a6ac3583ee9d Mon Sep 17 00:00:00 2001 From: Paul Jimenez Date: Sat, 7 Oct 2023 17:14:53 -0400 Subject: [PATCH] initial github actions CI --- .github/workflows/python-test.yml | 43 +++++++++++++++++++++++++++++++ .travis.yml | 20 -------------- README.md | 4 +-- 3 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/python-test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml new file mode 100644 index 0000000..c943438 --- /dev/null +++ b/.github/workflows/python-test.yml @@ -0,0 +1,43 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10'] + + env: + VIRTUAL_ENV: /usr + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + make dev + - name: Test with pytest + run: | + make test + - name: Lint with pylint + run: | + make pylint + - name: Typecheck with mypy + run: | + make mypy + + + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a4959fa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: python -sudo: false -python: - - "2.7" - - "3.4" -# - "3.5" # not supported by travis yet -install: -# - "pip install ." -script: make test -notifications: - email: false -# irc: -# channels: -# - "irc.freenode.org#tmda" -# on_success: change -# on_failure: always -# template: -# - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" -# skip_join: true - diff --git a/README.md b/README.md index 2f02320..9d0289e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ MHI mhi is a commandline style mailreader in the tradition of mh and nmh, but mutated to support IMAP. -[![Build Status](https://travis-ci.org/pjz/mhi.svg?branch=master)](https://travis-ci.org/pjz/mhi) +[![Build Status](https://github.com/pjz/mhi/actions/workflows/python-test.yml/badge.svg)](https://github.com/pjz/mhi/actions/workflows/python-test.yml) Why? ---- @@ -19,7 +19,7 @@ IMAP folders), so I had to write my own client. Python's imaplib made this easy How? ---- -As of v0.6.5 MHI is available as a PyPI package (`pip install mhi`) +As of v0.6.5 MHI is available as a PyPI package (`pipx install mhi`) The same version also incorporates the old mkLinks wrapper-script functionality via: