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

Add new Pull Request workflow #318

Merged
merged 1 commit into from
Nov 21, 2023
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
26 changes: 26 additions & 0 deletions .github/workflows/pythonpr.yml
Original file line number Diff line number Diff line change
@@ -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'
32 changes: 16 additions & 16 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
3 changes: 2 additions & 1 deletion test/test_client.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion test/test_market.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down