Skip to content

Commit

Permalink
Add integration test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwenyihust committed Jul 2, 2024
1 parent fd49ea8 commit dbd47cd
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Integration Test

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:13
env:
POSTGRES_USER: server
POSTGRES_PASSWORD: password-server
POSTGRES_DB: server_db
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
working-directory: server

- name: Run tests
run: |
python -m unittest discover tests
working-directory: server

0 comments on commit dbd47cd

Please sign in to comment.