name: Shitposter CI on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python 3.9 uses: actions/setup-python@v5 with: python-version: "3.9" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt pip freeze - name: Run CLI E2E Tests run: python3 tests/test_e2e.py - name: Run Local API Tests run: | # Start server in background (port 7860) and log output python3 server.py > server.log 2>&1 & SERVER_PID=$! # Give it time to boot sleep 10 # Run API tests against 127.0.0.1 to avoid IPv6 issues export API_URL="http://127.0.0.1:7860" if ! python3 tests/test_api_e2e.py; then echo "API Test Failed. Server Logs:" cat server.log exit 1 fi # Cleanup kill $SERVER_PID