Skip to content

Commit 555f56c

Browse files
authored
Merge pull request #15 from advanced-computing/lab6-ci-lint-validate
Lab6 ci lint validate
2 parents 256fe9b + 93694ce commit 555f56c

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

.github/workflows/tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.11"
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
22+
23+
- name: Lint (ruff)
24+
run: |
25+
ruff check .
26+
27+
- name: Run tests
28+
run: |
29+
pytest -q
30+

conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import sys
2+
from pathlib import Path
3+
4+
# Ensure the project root is on sys.path so tests can import utils.py
5+
PROJECT_ROOT = Path(__file__).resolve().parent
6+
if str(PROJECT_ROOT) not in sys.path:
7+
sys.path.insert(0, str(PROJECT_ROOT))
8+

requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
streamlit
22
pandas
33
plotly
4-
requests
4+
requests
5+
ruff
6+
pytest
7+
matplotlib

0 commit comments

Comments
 (0)