ci: 全流程 CI/CD 自动化测试 Pipeline #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E Tests | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths: | |
| - "**.py" | |
| - "tests/e2e/**" | |
| - ".github/workflows/e2e-ci.yml" | |
| push: | |
| branches: [master, develop] | |
| paths: | |
| - "**.py" | |
| - "tests/e2e/**" | |
| - ".github/workflows/e2e-ci.yml" | |
| jobs: | |
| backend-e2e: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| pip install -r requirements-dev.txt | |
| playwright install --with-deps chromium | |
| - name: Run e2e tests (headless, no LLM calls) | |
| run: | | |
| pytest tests/e2e \ | |
| -v \ | |
| --tb=short \ | |
| -m "not slow" \ | |
| --junitxml=test-results-e2e.xml | |
| env: | |
| ANTHROPIC_API_KEY: "test-placeholder" | |
| ARK_API_KEY: "test-placeholder" | |
| - name: Upload e2e results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-results | |
| path: test-results-e2e.xml |