From 764bf334c83c6680e165f02421f8f8986c48a93f Mon Sep 17 00:00:00 2001 From: StalkR Date: Tue, 25 Nov 2025 18:55:44 +0100 Subject: [PATCH] convert travis to a github action --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ .travis.yml | 34 --------------------------- README.rst | 8 +++++-- 3 files changed, 53 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f06bc58 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: build + +on: + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + fail-fast: false + steps: + - name: checkout + uses: actions/checkout@v6 + + - name: set up python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: install + run: pip install -e . + + - name: test + run: | + python test_pyformat.py + pyformat pyformat.py + python test_acid.py setup.py + + pycodestyle pyformat.py + pip install pyflakes + pyflakes pyformat.py + + - name: coverage + run: | + pip install coverage + make coverage + + - name: Coveralls + uses: coverallsapp/github-action@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ba34f00..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false - -language: python - -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - -env: - - - - LANG= - - PYTHONIOENCODING=ascii - - PYTHONIOENCODING=utf-8 - - PYTHONOPTIMIZE=2 - -install: - - python setup.py --quiet install - -script: - - python test_pyformat.py - - pyformat pyformat.py - - python test_acid.py setup.py - - - pycodestyle pyformat.py - - pip install pyflakes; pyflakes pyformat.py - -after_success: - - pip install --quiet coverage - - make coverage - - - pip install --quiet coveralls - - coveralls diff --git a/README.rst b/README.rst index 5ccfd3c..1885d8b 100644 --- a/README.rst +++ b/README.rst @@ -2,10 +2,14 @@ pyformat ======== -.. image:: https://travis-ci.org/myint/pyformat.svg?branch=master - :target: https://travis-ci.org/myint/pyformat +.. image:: https://github.com/myint/pyformat/actions/workflows/build.yml/badge.svg + :target: https://github.com/pyformat/actions/actions/workflows/build.yml :alt: Build status +.. image:: https://coveralls.io/repos/github/myint/pyformat/badge.svg + :target: https://coveralls.io/github/myint/pyformat + :alt: Coverage status + *pyformat* formats Python code to follow a consistent style.