diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdc9fa98a..0d03743e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -146,3 +146,37 @@ jobs: env_vars: OS,PYTHON name: codecov-umbrella fail_ci_if_error: false + + test_windows: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2022] + python: [3.8] + platform: [cpu, cu111] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Upgrade pip + run: pip install pip --upgrade --user + - name: Install PyTorch + # As a complement to Linux CI, we test on PyTorch LTS version + run: pip install torch==1.8.2+${{ matrix.platform }} torchvision==0.9.2+${{ matrix.platform }} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html + - name: Install MMCV + run: pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.8/index.html --only-binary mmcv-full + - name: Install unittest dependencies + run: pip install -r requirements.txt + - name: Show pip list + run: pip list + - name: Build and install + run: pip install -e . + - name: Run unittests + run: coverage run --branch --source mmedit -m pytest tests -sv + - name: Generate coverage report + run: | + coverage xml + coverage report -m + - name: Upload coverage to Codecov