forked from beimingwu/beimingwu
fix(backend): add workflow for pull request of backend
This commit is contained in:
parent
23f43fe7c2
commit
4a769fda3a
|
|
@ -0,0 +1,27 @@
|
|||
name: pr-test-backend
|
||||
run-name: ${{ github.actor }} is running backend tests
|
||||
on:
|
||||
push:
|
||||
branches: [ add_pr_test_backend ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'backend/**'
|
||||
jobs:
|
||||
run_tests:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
cache: 'pip' # caching pip dependencies
|
||||
- uses: shogo82148/actions-setup-redis@v1
|
||||
with:
|
||||
redis-version: "6.x"
|
||||
- name: Install dependencies
|
||||
run: pip install -r backend/requirements.txt
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd backend
|
||||
PYTHONPATH=. python3 tests/test_user.py
|
||||
|
|
@ -42,4 +42,5 @@ redis
|
|||
fast_pytorch_kmeans
|
||||
concurrent-log-handler
|
||||
kubernetes
|
||||
gunicorn
|
||||
gunicorn
|
||||
learnware
|
||||
Loading…
Reference in New Issue