phuochungus commited on
Commit
f0ef2d9
1 Parent(s): d27d7ba

rewrite test.yml to download model from outside

Browse files
Files changed (2) hide show
  1. .github/workflows/test.yml +6 -2
  2. app/__init__.py +1 -3
.github/workflows/test.yml CHANGED
@@ -9,9 +9,8 @@ on:
9
  jobs:
10
  build-linux:
11
  runs-on: ubuntu-latest
12
-
13
  steps:
14
- - uses: nschloe/action-checkout-with-lfs-cache@v1
15
  - name: Set up Python 3.8
16
  uses: actions/setup-python@v3
17
  with:
@@ -19,6 +18,10 @@ jobs:
19
  - name: install dependency
20
  run: |
21
  pip install -r app/requirements.txt
 
 
 
 
22
  - name: Run test
23
  run: pytest
24
  env:
@@ -31,3 +34,4 @@ jobs:
31
  AURA_INSTANCEID: ${{secrets.AURA_INSTANCEID}}
32
  AURA_INSTANCENAME: ${{secrets.AURA_INSTANCENAME}}
33
  FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}
 
 
9
  jobs:
10
  build-linux:
11
  runs-on: ubuntu-latest
 
12
  steps:
13
+ - uses: actions/checkout@v4
14
  - name: Set up Python 3.8
15
  uses: actions/setup-python@v3
16
  with:
 
18
  - name: install dependency
19
  run: |
20
  pip install -r app/requirements.txt
21
+ apt-get install wget libgl1 ffmpeg redis -y
22
+ - name: download model
23
+ run: |
24
+ wget -O ./model/end2end.onnx ${MODEL_URL}
25
  - name: Run test
26
  run: pytest
27
  env:
 
34
  AURA_INSTANCEID: ${{secrets.AURA_INSTANCEID}}
35
  AURA_INSTANCENAME: ${{secrets.AURA_INSTANCENAME}}
36
  FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}
37
+ MODEL_URL: ${{secrets.MODEL_URL}}
app/__init__.py CHANGED
@@ -5,9 +5,7 @@ import logging
5
  from dotenv import load_dotenv
6
  from mmdeploy_runtime import Detector
7
  from supabase import create_client, Client
8
- import firebase_admin
9
- from firebase_admin import credentials, initialize_app
10
- from firebase_admin import firestore
11
  from neo4j import GraphDatabase
12
 
13
 
 
5
  from dotenv import load_dotenv
6
  from mmdeploy_runtime import Detector
7
  from supabase import create_client, Client
8
+ from firebase_admin import credentials, initialize_app, firestore
 
 
9
  from neo4j import GraphDatabase
10
 
11