mirror of
https://github.com/wekan/wekan.git
synced 2025-12-24 03:10:12 +01:00
Add API testing job to e2e workflow with MongoDB user setup and pytest execution
This commit is contained in:
parent
72d89164e6
commit
0c69ba2b4d
1 changed files with 36 additions and 0 deletions
36
.github/workflows/e2e-testing.yml
vendored
36
.github/workflows/e2e-testing.yml
vendored
|
|
@ -67,3 +67,39 @@ jobs:
|
|||
|
||||
sudo docker compose pull
|
||||
sudo docker compose up -d
|
||||
|
||||
API-tests:
|
||||
needs: deploy
|
||||
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: 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue