compvis / .github /workflows /tests_cpu.yml
Dexter's picture
Upload folder using huggingface_hub
36c95ba verified
name: tests-cpu
on:
push:
branches: [master]
pull_request:
branches: [master]
types: [open, reopened, synchronize, review_requested, ready_for_review]
schedule:
- cron: "0 4 * * *"
jobs:
tests-cpu:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.8, 3.9]
pytorch-version: [1.8.1, 1.9.1]
steps:
- uses: actions/checkout@v2
- name: Setup conda dependencies
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -l {0}
run: |
conda install curl -c conda-forge
conda install pytorch=${{ matrix.pytorch-version }} cpuonly -c pytorch
pip install .[all]
- name: Run Tests
shell: bash -l {0}
run: pytest -v --device cpu --dtype float32,float64 --cov=kornia --cov-report xml ./test --flake8 --mypy
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: cpu,pytest, torch${{ matrix.pytorch-version }}
name: cpu-coverage