Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/e2e-pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: E2E Tests (PyTest)

on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
workflow_dispatch:

jobs:
e2e-pytest:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tests/e2e/requirements.txt

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Pull Docker images
run: |
docker pull permitio/opal-server:latest
docker pull permitio/opal-client:latest
docker pull postgres:alpine

- name: Run E2E tests
run: |
pytest tests/e2e/ -v -s --tb=short --maxfail=3
env:
OPAL_IMAGE_TAG: latest

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-results
path: |
pytest-report.html
.pytest_cache/

- name: Cleanup
if: always()
run: |
cd app-tests
docker compose -f docker-compose-app-tests.yml down -v || true
rm -rf opal-tests-policy-repo temp-repo gitea-data git-repos .env || true
11 changes: 11 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
OPAL Testing Suite

This package contains all tests for the OPAL project.

Structure:
- e2e/: End-to-end tests using PyTest framework
- (other test directories as needed)
"""

__version__ = "1.0.0"
Loading