diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86adf1d..8076da1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ name: API workflow on: [push, pull_request] jobs: - build: + api: runs-on: ubuntu-latest name: Test python API steps: @@ -20,3 +20,40 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} + flags: api + + smiles: + runs-on: ubuntu-latest + name: Test python API + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install requirements + run: pip install -r api/requirements.txt + - name: Run tests and collect coverage + run: pytest --cov=smiles.smiles --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: smiles + + all: + runs-on: ubuntu-latest + name: Test python API + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install requirements + run: pip install -r api/requirements.txt + - name: Run tests and collect coverage + run: pytest --cov --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: all diff --git a/smiles/__init__.py b/smiles/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smiles/smiles.py b/smiles/smiles.py new file mode 100644 index 0000000..5cba42e --- /dev/null +++ b/smiles/smiles.py @@ -0,0 +1,7 @@ +class Smiles: + + def smiles(): + return ':)' + + def frowns(): + return ':(' diff --git a/smiles/test_calculator.py b/smiles/test_calculator.py new file mode 100644 index 0000000..39ae79b --- /dev/null +++ b/smiles/test_calculator.py @@ -0,0 +1,5 @@ +from .smiles import Smiles + + +def test_smiles(): + assert Smiles.smiles() == ':)'