Spaces:
Sleeping
Sleeping
poojary9991
commited on
Commit
·
7d67e7d
1
Parent(s):
d65dccb
deleted the previous yml file and created a new one
Browse files- .github/workflows/main.yml +0 -67
- .github/workflows/test.yml +20 -0
.github/workflows/main.yml
DELETED
|
@@ -1,67 +0,0 @@
|
|
| 1 |
-
name: Sync to Hugging Face Hub
|
| 2 |
-
|
| 3 |
-
on:
|
| 4 |
-
push:
|
| 5 |
-
branches: [main]
|
| 6 |
-
|
| 7 |
-
# To run this workflow manually from the Actions tab
|
| 8 |
-
workflow_dispatch:
|
| 9 |
-
|
| 10 |
-
jobs:
|
| 11 |
-
test:
|
| 12 |
-
runs-on: ${{ matrix.os }}
|
| 13 |
-
strategy:
|
| 14 |
-
matrix:
|
| 15 |
-
os: [ubuntu-latest, windows-latest]
|
| 16 |
-
python-version: ['3.7', '3.8', '3.9']
|
| 17 |
-
|
| 18 |
-
steps:
|
| 19 |
-
- uses: actions/checkout@v2
|
| 20 |
-
with:
|
| 21 |
-
fetch-depth: 0
|
| 22 |
-
|
| 23 |
-
- name: Set up Python ${{ matrix.python-version }}
|
| 24 |
-
uses: actions/setup-python@v2
|
| 25 |
-
with:
|
| 26 |
-
python-version: ${{ matrix.python-version }}
|
| 27 |
-
|
| 28 |
-
- name: Install dependencies
|
| 29 |
-
run: |
|
| 30 |
-
python -m pip install --upgrade pip
|
| 31 |
-
pip install tox tox-gh-actions
|
| 32 |
-
|
| 33 |
-
- name: Test with tox
|
| 34 |
-
run: tox
|
| 35 |
-
|
| 36 |
-
sync-to-hub:
|
| 37 |
-
runs-on: ubuntu-latest
|
| 38 |
-
needs: test # This line makes sync-to-hub dependent on the test job
|
| 39 |
-
|
| 40 |
-
steps:
|
| 41 |
-
- name: Checkout for Hugging Face push
|
| 42 |
-
uses: actions/checkout@v2
|
| 43 |
-
with:
|
| 44 |
-
fetch-depth: 0
|
| 45 |
-
|
| 46 |
-
- name: Add remote
|
| 47 |
-
env:
|
| 48 |
-
CaseStudy1: ${{ secrets.CaseStudy1 }}
|
| 49 |
-
run: git remote add space https://kroohaniwpi:$CaseStudy1@huggingface.co/spaces/ML-OPS-Grp11/CaseStudy1
|
| 50 |
-
|
| 51 |
-
- name: Push to hub
|
| 52 |
-
env:
|
| 53 |
-
CaseStudy1: ${{ secrets.CaseStudy1 }}
|
| 54 |
-
run: git push --force https://kroohaniwpi:$CaseStudy1@huggingface.co/spaces/ML-OPS-Grp11/CaseStudy1
|
| 55 |
-
|
| 56 |
-
notify:
|
| 57 |
-
runs-on: ubuntu-latest
|
| 58 |
-
needs: test
|
| 59 |
-
|
| 60 |
-
steps:
|
| 61 |
-
- name: Send Discord notification
|
| 62 |
-
env:
|
| 63 |
-
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
|
| 64 |
-
run: |
|
| 65 |
-
curl -X POST -H "Content-Type: application/json" \
|
| 66 |
-
-d "{\"content\": \"A new commit was pushed to the main branch by $GITHUB_ACTOR. 😄 CS553_CaseStudy_Group 11 rock!\"}" \
|
| 67 |
-
$DISCORD_WEBHOOK_URL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/test.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync to Hugging Face hub
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: [main]
|
| 5 |
+
|
| 6 |
+
# to run this workflow manually from the Actions tab
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
sync-to-hub:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
- uses: actions/checkout@v3
|
| 14 |
+
with:
|
| 15 |
+
fetch-depth: 0
|
| 16 |
+
lfs: true
|
| 17 |
+
- name: Push to hub
|
| 18 |
+
env:
|
| 19 |
+
HF_TOKEN: ${{ secrets.TEST }}
|
| 20 |
+
run: git push https://poojary9991:$TEST@huggingface.co/spaces/poojary9991/CS553_ML_OPS_Group_11 main
|