smdbs commited on
Commit
817332e
·
1 Parent(s): f6ed769

fix: update workflows

Browse files

Update test.yaml to include HF_TOKEN environment variable and update sync_hf.yaml to run after testing.

.github/workflows/sync_hf.yaml CHANGED
@@ -1,7 +1,9 @@
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:
 
1
  name: Sync to Hugging Face hub
2
  on:
3
+ workflow_run:
4
+ workflows: ["Python tests"]
5
+ types:
6
+ - completed
7
 
8
  # to run this workflow manually from the Actions tab
9
  workflow_dispatch:
.github/workflows/test.yaml CHANGED
@@ -8,6 +8,9 @@ on:
8
  branches:
9
  - main
10
 
 
 
 
11
  jobs:
12
  test:
13
  runs-on: ubuntu-latest
@@ -25,5 +28,7 @@ jobs:
25
  python -m pip install --upgrade pip
26
  pip install -r requirements.txt
27
  - name: Run tests
 
 
28
  run: |
29
- python -m pytest test.py
 
8
  branches:
9
  - main
10
 
11
+ workflow_dispatch:
12
+
13
+
14
  jobs:
15
  test:
16
  runs-on: ubuntu-latest
 
28
  python -m pip install --upgrade pip
29
  pip install -r requirements.txt
30
  - name: Run tests
31
+ env:
32
+ HF_TOKEN: ${{ secrets.HF_INF_TOKEN }}
33
  run: |
34
+ HF_TOKEN=$HF_TOKEN python -m pytest test.py