Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

refactor cpu ci workflow (#1411)

Edgar Riba985d9cea8070
diff --git a/.github/workflows/tests_cpu.yml b/.github/workflows/tests_cpu.yml
index 2d540c896..8cde3e5af 100644
--- a/.github/workflows/tests_cpu.yml
+++ b/.github/workflows/tests_cpu.yml
@@ -2,52 +2,22 @@ name: tests-cpu
on:
push:
- branches:
- - master
+ branches: [master]
pull_request:
+ branches: [master]
+ types: [opened, reopened, synchronize, ready_for_review, review_requested]
schedule:
- cron: "0 4 * * *"
jobs:
- tests-cpu-os-versions-fast:
+ tests-cpu:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- python-version: [3.6, 3.7, 3.8]
- pytorch-version: [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
- - name: Upload coverage
- uses: codecov/codecov-action@v1
- with:
- file: ./coverage.xml
-
- tests-cpu-version-fast:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest]
- python-version: [3.7]
+ python-version: [3.6, 3.7, 3.8, 3.9]
pytorch-version: [1.8.1, 1.9.0, 1.9.1]
-
steps:
- uses: actions/checkout@v2
- name: Setup conda dependencies
@@ -63,8 +33,11 @@ jobs:
pip install .[all]
- name: Run Tests
shell: bash -l {0}
- run: pytest -v --device cpu --dtype float32,float64 --cov=kornia --cov-report xml ./test
+ 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:
- file: ./coverage.xml
+ token: ${{ secrets.CODECOV_TOKEN }}
+ file: coverage.xml
+ flags: cpu,pytest, torch${{ matrix.pytorch-version }}
+ name: cpu-coverage
diff --git a/.github/workflows/tests_cpu_versions.yml b/.github/workflows/tests_cpu_versions.yml
deleted file mode 100644
index 858ac4e0a..000000000
--- a/.github/workflows/tests_cpu_versions.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: tests-cpu-versions
-
-on:
- push:
- branches:
- - master
- # pull_request:
- schedule:
- - cron: "0 4 * * *"
-
-jobs:
- test-cpu-versions:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- python-version: [3.6, 3.7, 3.8]
- pytorch-version: [1.8.1, 1.9.0, 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:
- file: ./coverage.xml