add test steps before pushing to huggingface
Browse files
.github/workflows/push-to-hf.yml
CHANGED
|
@@ -16,6 +16,13 @@ jobs:
|
|
| 16 |
with:
|
| 17 |
fetch-depth: 0
|
| 18 |
lfs: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
- name: Push to hub
|
| 20 |
env:
|
| 21 |
HF_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
|
|
|
|
| 16 |
with:
|
| 17 |
fetch-depth: 0
|
| 18 |
lfs: true
|
| 19 |
+
|
| 20 |
+
- name: Build Docker image
|
| 21 |
+
run: docker build --build-arg TEST=true -t test_image .
|
| 22 |
+
|
| 23 |
+
- name: Run tests inside container
|
| 24 |
+
run: docker run --rm --env-file .env.test test_image pytest
|
| 25 |
+
|
| 26 |
- name: Push to hub
|
| 27 |
env:
|
| 28 |
HF_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
|