-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 995 Bytes
/
testing_ml.yml
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
38
39
40
name: Testing_ml
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test_metrics:
if: ${{ contains(github.event.pull_request.labels.*.name, 'new model') }}
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.9'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2.3.1
with:
python-version: 3.9
- name: Install dependecies
run: |
pip install -r requirements_test.txt
pip install dvc[gdrive]
- name: DVC pull
env:
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS }}
run: |
dvc pull exp/train/model.pth
- name: Test metrics
env:
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS }}
run: |
PYTHONPATH='src' pytest -m "ml" tests/test_ml.py
cp exp/train/model.pth exp/model.pth
dvc push exp/model.pth