Skip to content

Commit

Permalink
fix(backend): add workflow for pull request of backend
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxiaochuan committed Jan 16, 2024
1 parent 23f43fe commit 4a769fd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/pr_test_backend.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ redis
fast_pytorch_kmeans
concurrent-log-handler
kubernetes
gunicorn
gunicorn
learnware

0 comments on commit 4a769fd

Please sign in to comment.