E2E Tests #98
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 | |
| on: | |
| push: | |
| branches: [ master, main, develop ] | |
| paths: | |
| - 'words2num2/**' | |
| - 'tests/**' | |
| - '.github/workflows/e2e-tests.yml' | |
| pull_request: | |
| branches: [ master, main ] | |
| paths: | |
| - 'words2num2/**' | |
| - 'tests/**' | |
| schedule: | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| include: | |
| - os: ubuntu-latest | |
| python-version: 'pypy-3.10' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov | |
| pip install -e . | |
| - name: Run E2E suite | |
| run: pytest tests/ -v --tb=short | |
| continue-on-error: ${{ startsWith(matrix.python-version, 'pypy') }} | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-results-${{ matrix.os }}-${{ matrix.python-version }} | |
| path: | | |
| *.log | |
| test-results/ | |
| retention-days: 30 | |
| summary: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Create summary | |
| run: | | |
| echo "# E2E Test Results Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "## Test Configuration" >> $GITHUB_STEP_SUMMARY | |
| echo "- Trigger: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- Branch: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- Commit: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY |