Spaces:
Sleeping
Sleeping
Atharva Thakur
commited on
Commit
β’
2971a70
1
Parent(s):
584463e
Update StreamlitTesting.yml
Browse files- .github/workflows/StreamlitTesting.yml +23 -13
- test.py β Experiments.py +0 -0
- requirements.txt +3 -1
- test_app.py +9 -0
.github/workflows/StreamlitTesting.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
name:
|
2 |
|
3 |
on:
|
4 |
push:
|
@@ -10,17 +10,27 @@ permissions:
|
|
10 |
contents: read
|
11 |
|
12 |
jobs:
|
13 |
-
|
|
|
14 |
runs-on: ubuntu-latest
|
|
|
15 |
steps:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Python application
|
2 |
|
3 |
on:
|
4 |
push:
|
|
|
10 |
contents: read
|
11 |
|
12 |
jobs:
|
13 |
+
build:
|
14 |
+
|
15 |
runs-on: ubuntu-latest
|
16 |
+
|
17 |
steps:
|
18 |
+
- uses: actions/checkout@v3
|
19 |
+
- name: Set up Python 3.10
|
20 |
+
uses: actions/setup-python@v3
|
21 |
+
with:
|
22 |
+
python-version: "3.10"
|
23 |
+
- name: Install dependencies
|
24 |
+
run: |
|
25 |
+
python -m pip install --upgrade pip
|
26 |
+
pip install flake8 pytest
|
27 |
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
28 |
+
- name: Lint with flake8
|
29 |
+
run: |
|
30 |
+
# stop the build if there are Python syntax errors or undefined names
|
31 |
+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
32 |
+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
33 |
+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
34 |
+
- name: Test with pytest
|
35 |
+
run: |
|
36 |
+
pytest -vv
|
test.py β Experiments.py
RENAMED
File without changes
|
requirements.txt
CHANGED
@@ -6,4 +6,6 @@ seaborn
|
|
6 |
langchain-google-genai
|
7 |
langchain-experimental
|
8 |
python-dotenv
|
9 |
-
tabulate
|
|
|
|
|
|
6 |
langchain-google-genai
|
7 |
langchain-experimental
|
8 |
python-dotenv
|
9 |
+
tabulate
|
10 |
+
|
11 |
+
pytest
|
test_app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from streamlit.testing.v1 import AppTest
|
2 |
+
|
3 |
+
def test_smoke():
|
4 |
+
"""Basic smoke test"""
|
5 |
+
at = AppTest.from_file("app.py", default_timeout=10).run()
|
6 |
+
# Supported elements are primarily exposed as properties on the script
|
7 |
+
# results object, which returns a sequence of that element.
|
8 |
+
assert not at.exception
|
9 |
+
|