fix: set env in runner (#891)

This commit is contained in:
Yineng Zhang
2024-08-02 18:48:56 +08:00
committed by GitHub
parent 30a9b2ef20
commit 2e218b9e04
3 changed files with 8 additions and 20 deletions

View File

@@ -21,16 +21,14 @@ jobs:
unit-test:
runs-on: self-hosted
env:
HF_TOKEN : ${{ secrets.HF_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
cd /data/zhyncs/venv && source ./bin/activate && cd -
source $HOME/venv/bin/activate
echo "$HOME/venv/bin" >> $GITHUB_PATH
pip cache purge
pip install --upgrade pip
@@ -40,29 +38,20 @@ jobs:
- name: Test Frontend Language with OpenAI Backend
run: |
cd /data/zhyncs/venv && source ./bin/activate && cd -
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
cd test/lang
python3 test_openai_backend.py
- name: Test Frontend Language with SRT Backend
run: |
cd /data/zhyncs/venv && source ./bin/activate && cd -
cd test/lang
python3 test_srt_backend.py
- name: Test OpenAI API Server
run: |
cd /data/zhyncs/venv && source ./bin/activate && cd -
cd test/srt
python3 test_openai_server.py
- name: Test Accuracy
run: |
cd /data/zhyncs/venv && source ./bin/activate && cd -
cd test/srt
python3 test_eval_accuracy.py