Skip to content

Commit 38827b6

Browse files
authored
fix GitHub action for polyapi python unittests, fix polyapi python unittests (#66)
* make tests pass and github actions * comment + push * add dev_requirements * use dev requirements * using mkdir to avoid poly not existing * Revert deployables anf change whitespace for passing tests * undo diff * undo deployables.py change * new python-ci with pytest, correct actions syntax * add flask to the requirements, needed for a test
1 parent 5b9f621 commit 38827b6

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/python-ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Python CI
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
pull_request:
7+
branches: [develop]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.12
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
cache: 'pip'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r dev_requirements.txt --no-cache-dir
26+
27+
- name: Create dummy poly directory for tests
28+
run: mkdir -p polyapi/poly
29+
30+
- name: Run unit tests
31+
run: python -m unittest discover -s tests -t . -v

dev_requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
-r requirements.txt
22
mock==5.2.0
3-
pytest
3+
pytest
4+
flask==3.0.3
5+

0 commit comments

Comments
 (0)