From 10ea4bfb616390b5dbee89214da89576b6e6cf22 Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Tue, 9 Jun 2020 13:33:25 +1000 Subject: [PATCH] Github Action to automatically run the unit tests --- .github/workflows/tests.yml | 26 +++++++++++++++++++ unittests/__init__.py | 0 unittests/{TestBulk.py => test_bulk.py} | 0 unittests/{TestCards.py => test_cards.py} | 0 unittests/{TestCatalog.py => test_catalog.py} | 0 unittests/{TestRulings.py => test_rulings.py} | 0 unittests/{TestSets.py => test_sets.py} | 0 .../{TestSymbology.py => test_symbology.py} | 0 8 files changed, 26 insertions(+) create mode 100644 .github/workflows/tests.yml create mode 100644 unittests/__init__.py rename unittests/{TestBulk.py => test_bulk.py} (100%) rename unittests/{TestCards.py => test_cards.py} (100%) rename unittests/{TestCatalog.py => test_catalog.py} (100%) rename unittests/{TestRulings.py => test_rulings.py} (100%) rename unittests/{TestSets.py => test_sets.py} (100%) rename unittests/{TestSymbology.py => test_symbology.py} (100%) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..113c822 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,26 @@ +name: Python Tests + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + pytest diff --git a/unittests/__init__.py b/unittests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/unittests/TestBulk.py b/unittests/test_bulk.py similarity index 100% rename from unittests/TestBulk.py rename to unittests/test_bulk.py diff --git a/unittests/TestCards.py b/unittests/test_cards.py similarity index 100% rename from unittests/TestCards.py rename to unittests/test_cards.py diff --git a/unittests/TestCatalog.py b/unittests/test_catalog.py similarity index 100% rename from unittests/TestCatalog.py rename to unittests/test_catalog.py diff --git a/unittests/TestRulings.py b/unittests/test_rulings.py similarity index 100% rename from unittests/TestRulings.py rename to unittests/test_rulings.py diff --git a/unittests/TestSets.py b/unittests/test_sets.py similarity index 100% rename from unittests/TestSets.py rename to unittests/test_sets.py diff --git a/unittests/TestSymbology.py b/unittests/test_symbology.py similarity index 100% rename from unittests/TestSymbology.py rename to unittests/test_symbology.py