]> git.ipfire.org Git - thirdparty/python-drafthorse.git/commitdiff
Add GitHub Actions
authorRaphael Michel <michel@rami.io>
Wed, 3 Aug 2022 15:36:04 +0000 (17:36 +0200)
committerRaphael Michel <michel@rami.io>
Wed, 3 Aug 2022 15:53:15 +0000 (17:53 +0200)
.github/workflows/tests.yml [new file with mode: 0644]
.travis.yml [deleted file]
setup.py

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644 (file)
index 0000000..7c673e6
--- /dev/null
@@ -0,0 +1,53 @@
+name: Tests
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    name: Tests
+    strategy:
+      matrix:
+        python-version:
+          - "3.8"
+          - "3.9"
+          - "3.10"
+    steps:
+      - uses: actions/checkout@v2
+      - name: Install Dependencies
+        run: sudo apt install libxml2-dev libxslt-dev
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v1
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Install Dependencies
+        run: python -m pip install -U pip wheel coverage codecov pytest
+      - name: Install Dependencies
+        run: python setup.py develop
+      - name: Run tests
+        run: coverage run -m pytest tests
+      - name: Upload coverage
+        run: codecov
+  style:
+    runs-on: ubuntu-latest
+    name: Style
+    steps:
+      - uses: actions/checkout@v2
+      - name: Install Dependencies
+        run: sudo apt install libxml2-dev libxslt-dev
+      - name: Set up Python 3.10
+        uses: actions/setup-python@v1
+        with:
+          python-version: "3.10"
+      - name: Install Dependencies
+        run: python -m pip install -U pip wheel black isort pytest
+      - name: Install Dependencies
+        run: python setup.py develop
+      - name: Run black
+        run: black --check .
+      - name: Run isort
+        run: isort -c .
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index 329a98d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-language: python
-sudo: false
-python:
-    - "3.5"
-    - "3.6"
-install:
-    - pip install -U pip wheel coverage codecov
-    - pip install -r requirements_dev.txt
-    - python setup.py develop
-script:
-    - flake8 drafthorse tests
-    - isort -rc -c drafthorse tests
-    - coverage run -m py.test -v tests/ && codecov
-cache:
-    directories:
-        - $HOME/.cache/pip
index 7aee4ee3f6cb329b0b6a74bb268fcdd10a9057b1..200176af5c5dbc1482e6eecffad39ef6543faae5 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -27,13 +27,13 @@ setup(
         "Intended Audience :: Developers",
         "Intended Audience :: Other Audience",
         "License :: OSI Approved :: Apache Software License",
-        "Programming Language :: Python :: 3.4",
-        "Programming Language :: Python :: 3.5",
-        "Programming Language :: Python :: 3.6",
+        "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
+        "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
     ],
     keywords="xml banking sepa",
-    install_requires=["lxml", "PyPDF2"]
-    + (["isoweek"] if sys.version_info < (3, 6) else []),
+    install_requires=["lxml", "PyPDF2"],
     packages=find_packages(include=["drafthorse", "drafthorse.*"]),
     include_package_data=True,
 )