Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Run nightly CI just with labeled PR (#2128)

João Gustavo A. Amorim56f1c9a484ba
diff --git a/.github/workflows/pr_test_cpu.yml b/.github/workflows/pr_test_cpu.yml
index a4611e0b2..a51546565 100644
--- a/.github/workflows/pr_test_cpu.yml
+++ b/.github/workflows/pr_test_cpu.yml
@@ -3,7 +3,8 @@ name: Run tests on CPU
on:
pull_request:
branches: [master]
- types: [opened, reopened, synchronize, review_requested, ready_for_review]
+ types: [opened, reopened, synchronize, review_requested, ready_for_review, labeled]
+ workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -50,3 +51,30 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }} # to not depend on build via GH API
flags: cpu,${{ matrix.os }}_py-${{ matrix.python-version }}_pt-${{ matrix.pytorch-version }}_${{ matrix.pytorch-dtype }}
name: cpu-coverage
+
+ tests-nightly:
+ if: ${{ github.event.label.name == 'nightly' }}
+ name: ${{ matrix.os }} - python-${{ matrix.python-version }}, torch-nightly, ${{ matrix.pytorch-dtype }}
+ runs-on: ${{ matrix.os }}-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ os: ['Ubuntu', 'Windows', 'MacOS']
+ python-version: ['3.7', '3.8']
+ pytorch-version: ['nightly']
+ pytorch-dtype: ['float32', 'float64']
+
+ steps:
+ - name: Checkout kornia
+ uses: actions/checkout@v3
+
+ - name: Setting environment on ${{ matrix.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}
+ uses: ./.github/actions/env
+ with:
+ python-version: ${{ matrix.python-version }}
+ pytorch-version: ${{ matrix.pytorch-version }}
+
+ - name: Run CPU tests ${{ matrix.pytorch-dtype }}
+ shell: bash -l {0}
+ run: pytest -v --device cpu --dtype ${{ matrix.pytorch-dtype }}
diff --git a/.github/workflows/tests_nightly.yml b/.github/workflows/scheduled_test_nightly.yml
similarity index 93%
rename from .github/workflows/tests_nightly.yml
rename to .github/workflows/scheduled_test_nightly.yml
index 3ba2a1cf3..965b6a222 100644
--- a/.github/workflows/tests_nightly.yml
+++ b/.github/workflows/scheduled_test_nightly.yml
@@ -1,9 +1,6 @@
name: Tests on CPU (nightly)
on:
- pull_request:
- branches: [master]
- types: [opened, reopened, synchronize, review_requested, ready_for_review]
push:
branches: [master]
schedule:
diff --git a/README.md b/README.md
index 755d662a3..d2b9f60e2 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ English | [简体中文](README_zh-CN.md)
[![Twitter](https://img.shields.io/twitter/follow/kornia_foss?style=social)](https://twitter.com/kornia_foss)
[![tests-cpu](https://github.com/kornia/kornia/actions/workflows/scheduled_test_cpu.yml/badge.svg?event=schedule&&branch=master)](https://github.com/kornia/kornia/actions/workflows/scheduled_test_cpu.yml)
-[![tests-cpu-nightly](https://github.com/kornia/kornia/actions/workflows/tests_nightly.yml/badge.svg?event=schedule&&branch=master)](https://github.com/kornia/kornia/actions/workflows/tests_nightly.yml)
+[![tests-cpu-nightly](https://github.com/kornia/kornia/actions/workflows/scheduled_test_nightly.yml/badge.svg?event=schedule&&branch=master)](https://github.com/kornia/kornia/actions/workflows/scheduled_test_nightly.yml)
[![tests-cuda](https://github.com/kornia/kornia/actions/workflows/tests_cuda.yml/badge.svg)](https://github.com/kornia/kornia/actions/workflows/tests_cuda.yml)
[![codecov](https://codecov.io/gh/kornia/kornia/branch/master/graph/badge.svg?token=FzCb7e0Bso)](https://codecov.io/gh/kornia/kornia)
[![Documentation Status](https://readthedocs.org/projects/kornia/badge/?version=latest)](https://kornia.readthedocs.io/en/latest/?badge=latest)
diff --git a/README_zh-CN.md b/README_zh-CN.md
index 799bec45d..0496f9ba9 100644
--- a/README_zh-CN.md
+++ b/README_zh-CN.md
@@ -26,6 +26,7 @@
[![Twitter](https://img.shields.io/twitter/follow/kornia_foss?style=social)](https://twitter.com/kornia_foss)
[![tests-cpu](https://github.com/kornia/kornia/actions/workflows/tests_cpu.yml/badge.svg)](https://github.com/kornia/kornia/actions/workflows/tests_cpu.yml)
+[![tests-cpu-nightly](https://github.com/kornia/kornia/actions/workflows/scheduled_test_nightly.yml/badge.svg?event=schedule&&branch=master)](https://github.com/kornia/kornia/actions/workflows/scheduled_test_nightly.yml)
[![tests-cuda](https://github.com/kornia/kornia/actions/workflows/tests_cuda.yml/badge.svg)](https://github.com/kornia/kornia/actions/workflows/tests_cuda.yml)
[![codecov](https://codecov.io/gh/kornia/kornia/branch/master/graph/badge.svg?token=FzCb7e0Bso)](https://codecov.io/gh/kornia/kornia)
[![Documentation Status](https://readthedocs.org/projects/kornia/badge/?version=latest)](https://kornia.readthedocs.io/en/latest/?badge=latest)