From 1aba693dd99d5de723ac3730c8cb35e8a0e28ea6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Wed, 6 Mar 2024 09:24:47 +0100
Subject: [PATCH] move off to GitHub Actions

---
 .github/workflows/ci.yml | 24 +++++++++++++++++-------
 pyproject.toml           |  7 +++++--
 2 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 137116be..b7d2f031 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,17 +2,14 @@ name: build-satella
 run-name: ${{ github.actor }}
 on: [ push ]
 jobs:
-  build-wheel:
+  prepare-system:
     runs-on: "ubuntu-latest"
     strategy:
       matrix:
-        python-version: [ "3.6", "3.7", "3.8", "pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12" ]
+        python-version: [ "3.9" ]
     steps:
       - uses: actions/checkout@4
       - uses: actions/setup-python@4
-        with:
-          python-version: '${{ matrix.python-version }}'
-          cache: 'pip'
       - name: Install everything
         run: pip install -e .[test,dev,extras]
         with:
@@ -35,5 +32,18 @@ jobs:
         with:
           python-version: '${{ matrix.python-version }}'
           cache: 'pip'
-    paths:
-      - '!*.MD'
+  build-package:
+    needs: ["prepare-system"]
+    runs-on: ubuntu-latest
+    steps:
+      - name: Build package
+        run: python -m build .
+      - name: Store credentials
+        run: |
+          echo $PYPIRC_PASSWORD_DATA > ~/.pypirc
+          twine upload dist/*
+  convert-and-upload-coverage:
+    needs: ["build-package", "tests"]
+    steps:
+      - run: coverage xml
+      - uses: caffco/code-climate-github-action@v1.0.0
diff --git a/pyproject.toml b/pyproject.toml
index e36cb71e..2a5804f8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,8 +29,8 @@ dependencies = ["psutil"]
 version = {attr = "satella.__version__"}
 
 [project.optional-dependencies]
-dev = ["pylint", "pyyaml", "toml", "requests", "opentracing"]
-test =  ["pytest-cov", "pytest-xdist", "pytest", "pytest-forked", "pluggy", "py"]
+dev = ["pylint", "pyyaml", "toml", "requests", "opentracing", "codeclimate-test-reporter"]
+test =  ["pytest-cov", "pytest-xdist", "pytest", "pytest-forked", "pluggy", "py", "coverage<4.4"]
 extras = ["requests","pyyaml","toml", "ujson", "cassandra-driver", "opentracing"]
 
 
@@ -41,6 +41,9 @@ build-backend = "setuptools.build_meta"
 [tool.pep8]
 max-line-length = 119
 
+[tool.distutils.bdist_wheel]
+universal = true
+
 [project.urls]
 Homepage = "https://github.com/piotrmaslanka/satella"
 Documentation = "https://satella.readthedocs.io/"
-- 
GitLab