Testing model when src folder changes #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing Model | |
run-name: Testing model when src folder changes | |
on: | |
push: | |
paths: | |
- 'src/**' | |
- '!src/api/**' | |
- 'tests/behavioral_testing/**' | |
- 'tests/model_training_testing/**' | |
- 'tests/utility_testing/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Set up DVC | |
uses: iterative/setup-dvc@v1 | |
- name: Setup a Google Drive DVC Remote and pull data | |
env: | |
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} | |
run: | | |
dvc remote modify myremote gdrive_use_service_account true | |
dvc pull -r myremote | |
- name: Extract data | |
run: | | |
sudo apt-get install -y unzip | |
unzip data/processed/datasets_processed.zip -d data/processed/datasets_processed | |
- name: Behavioral testing with pytest | |
run: | | |
cd tests/behavioral_testing | |
pytest | |
- name: Model training testing with pytest | |
run: | | |
cd tests/model_training_testing | |
pytest | |
- name: Utility testing with pytest | |
run: | | |
cd tests/utility_testing | |
pytest |