mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 19:00:12 +01:00
45 lines
1 KiB
Text
45 lines
1 KiB
Text
name: Run API Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: App Startup with Docker
|
|
run: |
|
|
docker compose up -d
|
|
|
|
- name: Add test user to MongoDB
|
|
run: |
|
|
docker exec wekan-db mongosh wekan --eval '
|
|
db.users.insertOne({
|
|
username: "omriza5",
|
|
password: "123456",
|
|
email: "omriza5@gmail.com",
|
|
isAdmin: false
|
|
})
|
|
'
|
|
|
|
- name: Run API tests
|
|
env:
|
|
BASE_URL: ${{ secrets.WEKAN_URL }} # Example: Pass API base URL as a secret
|
|
run: |
|
|
pytest --maxfail=5 --disable-warnings -v
|