Add integration tests for all examples #91
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: Integration Tests | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 10 * * *" # This schedule runs at 10am UTC every day | |
| pull_request: | |
| paths: | |
| - 'examples/integration_tests.py' | |
| jobs: | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| fail-fast: false | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Set up the environment | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache uv packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/uv | |
| key: uv-${{ runner.os }}-${{ matrix.python-version }} | |
| - name: Install flyte & Build wheel | |
| run: | | |
| make dist | |
| - name: Install plugins and example dependencies | |
| working-directory: plugins | |
| run: | | |
| uv pip install ./ray ./pytorch ./dask ./spark | |
| uv pip install "../[examples-test]" # Install flyte with example test dependencies | |
| uv pip list | |
| - name: Run integration tests | |
| env: | |
| FLYTE_SDK_CI_TOKEN: "${{ secrets.FLYTE_SDK_CI_TOKEN }}" | |
| run: | | |
| uv run python -m pytest -n auto -v examples/integration_tests.py |