diff --git a/.github/workflows/pythonpr.yml b/.github/workflows/pythonpr.yml new file mode 100644 index 0000000..abb6ce3 --- /dev/null +++ b/.github/workflows/pythonpr.yml @@ -0,0 +1,26 @@ +name: ci-python-unittest + +on: + pull_request: + branches: [master] + +jobs: + unittest: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Unit tests + run: | + pip install . + python -m unittest discover -s ./test -p 'test_*.py' diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index b143a53..ba717eb 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -8,19 +8,19 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/test/test_client.py b/test/test_client.py index 704a335..2a7bccc 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -1,13 +1,14 @@ import os from decimal import Decimal from unittest import TestCase +import unittest from steampy.client import SteamClient from steampy.exceptions import LoginRequired from steampy.models import GameOptions, Asset from steampy.utils import account_id_to_steam_id, load_credentials - +@unittest.skip('Requires secrets/Steamguard.txt') class TestSteamClient(TestCase): @classmethod def setUpClass(cls): diff --git a/test/test_market.py b/test/test_market.py index 0f13b38..e65e7b0 100644 --- a/test/test_market.py +++ b/test/test_market.py @@ -1,12 +1,13 @@ import os from unittest import TestCase +import unittest from steampy.client import SteamClient from steampy.exceptions import TooManyRequests from steampy.models import GameOptions, Currency from steampy.utils import load_credentials - +@unittest.skip('Requires secrets/Steamguard.txt') class TestMarket(TestCase): @classmethod def setUpClass(cls):