Skip to content

Add constraints in Dockerfile #142

Add constraints in Dockerfile

Add constraints in Dockerfile #142

Workflow file for this run

name: End2End Tests
on:
pull_request:
branches:
- main
paths:
- 'tests/**'
- 'tools/**'
- '.github/workflows/end2end_tests.yaml'
- 'requirements*.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ubuntu_full:
name: E2E full on ubuntu-latest / Python ${{ matrix.version }} / shard ${{ matrix.shard }}
strategy:
fail-fast: false
matrix:
version: ['3.10']
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
cache: pip
- name: Install dependencies
shell: bash
run: |
CONSTRAINTS_FILE="$GITHUB_WORKSPACE/constraints.txt"
echo "setuptools<82" > "$CONSTRAINTS_FILE"
export PIP_CONSTRAINT="$CONSTRAINTS_FILE"
# pip >= 26.2 no longer applies PIP_CONSTRAINT to isolated build
# environments (needed for the mmcv sdist build, see
# https://github.com/open-mmlab/mmcv/issues/3325)
export PIP_BUILD_CONSTRAINT="$CONSTRAINTS_FILE"
pip install -e .[dev]
- name: Run full public tests
run: pytest tests/test_end2end.py --e2e-suite full --e2e-shard-index ${{ matrix.shard }} --e2e-shard-count 10 --download-weights -s -v
- name: Authenticate to Google Cloud
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
export_environment_variables: true
- name: Run private model tests
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
run: pytest tests/test_end2end.py::test_private_model_conversion --test-private --delete-weights-now -s -v
cross_platform_representative:
name: E2E representative on ${{ matrix.os }} / Python ${{ matrix.version }} / shard ${{ matrix.shard }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest]
version: ['3.10']
shard: [0, 1]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
cache: pip
- name: Install dependencies
shell: bash
run: |
CONSTRAINTS_FILE="$GITHUB_WORKSPACE/constraints.txt"
echo "setuptools<82" > "$CONSTRAINTS_FILE"
export PIP_CONSTRAINT="$CONSTRAINTS_FILE"
# pip >= 26.2 no longer applies PIP_CONSTRAINT to isolated build
# environments (needed for the mmcv sdist build, see
# https://github.com/open-mmlab/mmcv/issues/3325)
export PIP_BUILD_CONSTRAINT="$CONSTRAINTS_FILE"
pip install -e .[dev]
- name: Run representative public tests
run: pytest tests/test_end2end.py --e2e-suite representative --e2e-shard-index ${{ matrix.shard }} --e2e-shard-count 2 --download-weights -s -v
- name: Authenticate to Google Cloud
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
export_environment_variables: true
- name: Run private model tests
if: matrix.shard == 0 && github.event.pull_request.head.repo.full_name == github.repository
run: pytest tests/test_end2end.py::test_private_model_conversion --test-private --delete-weights-now -s -v