Skip to content

Commit 053f2d5

Browse files
committed
ASA-150: run python tests on push and create setup.py
1 parent 6cf1292 commit 053f2d5

File tree

5 files changed

+42
-6
lines changed

5 files changed

+42
-6
lines changed

.github/workflows/python-tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Python tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install pytest
22+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23+
- name: Test with pytest
24+
run: |
25+
pytest tests/python/

python-package/asa-package/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def solve_soccer():
2+
print("Put the ball in the back of the net")

python-package/setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from distutils.core import setup
2+
3+
setup(
4+
name="asa-package",
5+
version="0.0.1",
6+
description="Programmatically interact with the ASA API",
7+
author="American Soccer Analysis",
8+
url="https://github.com/American-Soccer-Analysis/asa-package",
9+
)

tests/python/simple_test.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/python/test_simple.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from unittest import TestCase
2+
3+
4+
class TestSimple(TestCase):
5+
def test_simple(self):
6+
pass

0 commit comments

Comments
 (0)