Browse Source

Run tests on push (#185)

J. Nick Koston 1 year ago
parent
commit
4d1568574e
3 changed files with 43 additions and 0 deletions
  1. 29 0
      .github/workflows/ci.yaml
  2. 6 0
      requirements.txt
  3. 8 0
      requirements_dev.txt

+ 29 - 0
.github/workflows/ci.yaml

@@ -0,0 +1,29 @@
+name: CI
+
+on:
+  - push
+  - pull_request
+
+jobs:
+  coverage:
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        python-version: [3.9, "3.10", "3.11"]
+
+    steps:
+    - uses: actions/checkout@v3
+    - name: Set up Python
+      uses: actions/setup-python@v4
+      with:
+        python-version: ${{ matrix.python-version }}
+        cache: "pip"
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install -r requirements_dev.txt .
+    - name: Tests
+      run: pytest --cov-report term-missing --cov-report=xml tests
+    - name: Upload coverage to Codecov
+      uses: codecov/codecov-action@v3

+ 6 - 0
requirements.txt

@@ -0,0 +1,6 @@
+async_timeout>=4.0.1
+bleak>=0.17.0
+bleak-retry-connector>=2.9.0
+cryptography>=38.0.3
+boto3>=1.20.24
+requests>=2.28.1

+ 8 - 0
requirements_dev.txt

@@ -0,0 +1,8 @@
+pytest-asyncio
+pytest-cov
+async_timeout>=4.0.1
+bleak>=0.17.0
+bleak-retry-connector>=2.9.0
+cryptography>=38.0.3
+boto3>=1.20.24
+requests>=2.28.1