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