File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,15 +19,28 @@ jobs:
1919 uses : actions/setup-python@v5
2020 with :
2121 python-version : ' 3.12'
22- - name : Install deps
22+ - name : Install deps and Project
2323 run : |
2424 cd etl
2525 python -m venv .venv
2626 . .venv/bin/activate
2727 pip install -r requirements.txt
2828 pip install pytest-httpx
29+ # 💡 NOVO: Instala o código-fonte como um pacote editável (`-e`),
30+ # que é a melhor prática para projetos com src/ para garantir que o 'etl' seja importável.
31+ pip install -e .
32+
2933 - name : Run tests
3034 run : |
35+ # Não precisamos mais do `cd etl` aqui, pois a instalação já configurou o path
36+ # e o ambiente virtual foi ativado.
37+
38+ # Entramos no diretório etl para ativar o ambiente.
3139 cd etl
3240 . .venv/bin/activate
33- pytest -q
41+
42+ # 💡 NOVO: Executamos o pytest no diretório PAI (o diretório 'etl'),
43+ # mas apontamos explicitamente para os testes em 'tests/'.
44+ # O pytest consegue encontrar o pacote 'etl' porque ele foi instalado
45+ # no passo anterior (`pip install -e .`).
46+ pytest tests -q
You can’t perform that action at this time.
0 commit comments