Skip to content

test_precommit

test_precommit #1655

Workflow file for this run

name: test_precommit
permissions: {} # No permissions by default on workflow level
on:
pull_request:
merge_group:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Python-Functional-Tests:
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-24.04"
- "windows-2022"
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
name: pr pre-commit test (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
with:
enable-cache: false
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --locked --extra tests --extra-index-url https://download.pytorch.org/whl/cpu
- name: Prepare test data
run: |
uv run python tests/accuracy/download_models.py -d data -j tests/precommit/public_scope.json -l
- name: Run test
run: |
uv run pytest --data=./data tests/functional
Zizmor-Scan-PR:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Run Zizmor scan
uses: open-edge-platform/geti-ci/actions/zizmor@4ec90fb54c7be053e40b9e3ecdf399cf501596ca
with:
scan-scope: "changed"
severity-level: "LOW"
confidence-level: "LOW"
fail-on-findings: true
Bandit-Scan-PR:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Run Bandit scan
uses: open-edge-platform/geti-ci/actions/bandit@4ec90fb54c7be053e40b9e3ecdf399cf501596ca
with:
scan-scope: "changed"
severity-level: "LOW"
confidence-level: "LOW"
config_file: "./pyproject.toml"
fail-on-findings: true
Semgrep-Scan-PR:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
fetch-depth: 0
- name: Run Semgrep scan
uses: open-edge-platform/geti-ci/actions/semgrep@4ec90fb54c7be053e40b9e3ecdf399cf501596ca
with:
scan-scope: "changed"
severity: "LOW"
fail-on-findings: true