File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ name: API workflow
44on : [push, pull_request]
55
66jobs :
7- build :
7+ api :
88 runs-on : ubuntu-latest
99 name : Test python API
1010 steps :
2020 uses : codecov/codecov-action@v5
2121 with :
2222 token : ${{ secrets.CODECOV_TOKEN }}
23+ flags : api
24+
25+ smiles :
26+ runs-on : ubuntu-latest
27+ name : Test python API
28+ steps :
29+ - uses : actions/checkout@v4
30+ - uses : actions/setup-python@v2
31+ with :
32+ python-version : ' 3.10'
33+ - name : Install requirements
34+ run : pip install -r api/requirements.txt
35+ - name : Run tests and collect coverage
36+ run : pytest --cov=smiles.smiles --cov-report=xml
37+ - name : Upload coverage to Codecov
38+ uses : codecov/codecov-action@v5
39+ with :
40+ token : ${{ secrets.CODECOV_TOKEN }}
41+ flags : smiles
42+
43+ all :
44+ runs-on : ubuntu-latest
45+ name : Test python API
46+ steps :
47+ - uses : actions/checkout@v4
48+ - uses : actions/setup-python@v2
49+ with :
50+ python-version : ' 3.10'
51+ - name : Install requirements
52+ run : pip install -r api/requirements.txt
53+ - name : Run tests and collect coverage
54+ run : pytest --cov --cov-report=xml
55+ - name : Upload coverage to Codecov
56+ uses : codecov/codecov-action@v5
57+ with :
58+ token : ${{ secrets.CODECOV_TOKEN }}
59+ flags : all
Original file line number Diff line number Diff line change 1+ class Smiles :
2+
3+ def smiles ():
4+ return ':)'
5+
6+ def frowns ():
7+ return ':('
Original file line number Diff line number Diff line change 1+ from .smiles import Smiles
2+
3+
4+ def test_smiles ():
5+ assert Smiles .smiles () == ':)'
You can’t perform that action at this time.
0 commit comments