Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): fix tests in repo #174

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ jobs:
name: Builds and publishes releases to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: Set up Python 3.9
uses: actions/setup-python@v4.3.0
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- name: Install wheel
run: >-
pip install wheel
- name: Build
run: >-
python3 setup.py sdist bdist_wheel
- name: Publish release to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.1
uses: pypa/gh-action-pypi-publish@v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
40 changes: 22 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,47 @@ on:
branches: [main, dev]

jobs:
build:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, "3.10"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v2.3.4
- name: 📥 Checkout the repository
uses: actions/checkout@v4
- name: 🛠️ Set up Python
uses: actions/setup-python@v5
with:
fetch-depth: 2
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: 📦 Install requirements
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
pip install tox tox-gh-actions
- name: 🏃 Test with tox
run: tox
- name: Upload coverage data
uses: "actions/upload-artifact@v2.2.4"
- name: 📤 Upload coverage to Codecov
uses: "actions/upload-artifact@v4"
with:
name: coverage-data
path: "coverage.xml"

coverage:
runs-on: ubuntu-latest
needs: build
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
- name: 📥 Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Download coverage data
uses: actions/download-artifact@v4.1.7
- name: 📥 Download coverage data
uses: actions/download-artifact@v4
with:
name: coverage-data
- name: Upload coverage report
uses: codecov/codecov-action@v2.0.2
- name: 📤 Upload coverage report
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[tox]
envlist = py39, py310, lint, mypy
envlist = py39, py310, py311, py312, lint, mypy
skip_missing_interpreters = True

[gh-actions]
python =
3.9: py39
3.10: py310, lint, mypy
3.10: py310
3.11: py311
3.12: py312, lint, mypy

[testenv]
commands =
Expand Down
Loading