-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 914 Bytes
/
Copy pathpython-ci.yml
File metadata and controls
37 lines (31 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: AgriSentry Core CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
name: Run Pytest Suite
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-asyncio aiosqlite
- name: Run tests
# 🚀 Injetando variáveis direto no ambiente do runner
env:
PYTHONPATH: src
DATABASE_URL: postgresql+asyncpg://postgres:fake_password@localhost:5432/postgres_test
MQTT_HOST: 127.0.0.1
MQTT_PORT: 1883
run: python -m pytest tests/ -v