diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index 61922a4daa..0000000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Nightly-Regression Tests - -on: - workflow_dispatch: # run on request (no need for PR) - schedule: - - cron: "0 0 * * *" - -jobs: - Tox: - runs-on: [self-hosted, linux, x64, anomalib] - strategy: - max-parallel: 1 - if: github.ref == 'refs/heads/main' - steps: - - name: CHECKOUT REPOSITORY - uses: actions/checkout@v4 - - name: Install Tox - run: pip install tox - - name: Coverage - run: tox -e nightly - - name: Upload coverage result - uses: actions/upload-artifact@v4 - with: - name: coverage - path: .tox/coverage.xml - md-dead-link-check: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: AlexanderDokuchaev/md-dead-link-check@v0.8 - with: - config: pyproject.toml diff --git a/pyproject.toml b/pyproject.toml index 0e3e5316a3..38184d170d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -205,8 +205,6 @@ src = ["src", "tests"] # Unlike Flake8, default to a complexity level of 10. max-complexity = 15 -[tool.ruff.per-file-ignores] -"tests/nightly/tools/benchmarking/test_benchmarking.py" = ["E402"] [tool.ruff.pydocstyle] convention = "google" diff --git a/tests/README.md b/tests/README.md index 21a22e87bf..f01115c994 100644 --- a/tests/README.md +++ b/tests/README.md @@ -98,15 +98,12 @@ Here's a brief explanation of each: from being committed to the repository. They can include things like style checks, unit tests, and static analysis. -- `pre-merge`: These tests are run before code is merged into a main or release - branch. They are typically more extensive than pre-commit tests and may - include integration tests, performance tests, and other checks that are too - time-consuming to run on every commit. +- `unit`: These tests are run before code is merged into a main or release + branch. These are used to test individual components. -- `nightly`: These are tests that are run on a regular schedule, typically once - per day ("nightly"). They can include long-running tests, extensive test - suites that cover edge cases, or tests that are too resource-intensive to run - on every commit or merge. +- `integration`: These tests are also run before the code is merged into a main + or release branch. These test whether the components work together. These focus + mainly on training, exporting and inferring models via the API and the CLI. - `trivy-scan`: Trivy is a comprehensive, open-source vulnerability scanner for containers. A `trivy-scan` would check your project's dependencies for known @@ -124,18 +121,12 @@ To run the pre-commit tests tox -e pre-commit ``` -To run the pre-merge tests +To run the unit and integration tests ```bash tox -e pre-merge ``` -To run the nightly tests - -```bash -tox -e nightly -``` - To run the trivy-scan ```bash diff --git a/tox.ini b/tox.ini index a8136f0fe7..2bd2e78f24 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,6 @@ skip_missing_interpreters = true envlist = pre-commit pre-merge-py{38,39,310} - nightly snyk-scan [testenv] @@ -47,25 +46,6 @@ commands = --ignore=notebooks/400_openvino \ --ignore=notebooks/500_use_cases/501_dobot -[testenv:nightly] -basepython = py310 -passenv = {[testenv]deps} - ANOMALIB_DATASET_PATH -deps = - coverage - pytest - flaky - -commands = - ; 0. Install Anomalib first. - pip install .[full] - - ; 1. Run Coverage for the nightly tests. - coverage erase - coverage run --include=anomalib/* -m pytest tests/legacy/nightly/ - coverage report -m --fail-under=33 - coverage xml -o {toxworkdir}/coverage.xml - [testenv:trivy-scan] basepython = py310 passenv = TRIVY_DOWNLOAD_URL