Skip to content

Merge pull request #2 from Totto16/gui #121

Merge pull request #2 from Totto16/gui

Merge pull request #2 from Totto16/gui #121

Workflow file for this run

name: Python Lints / Checks
on:
pull_request:
push:
branches:
- main
jobs:
mypy_lint:
name: Lint files
runs-on: ubuntu-24.04
container:
image: python:3.12-bookworm
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: prepare environment
run: |
apt-get update
apt-get install cmake --no-install-recommends -y
pip install pipenv -U --quiet
apt-get update
apt-get install python3-wxgtk4.0 libgtk-3-dev -y
pipenv run pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04/ wxPython
pipenv install --dev
- name: run lint
run: |
pipenv run mypy
pipenv run ruff-ci github
- name: run checks
run: |
pipenv check
tests:
name: Run tests
runs-on: ubuntu-24.04
container:
image: python:3.12-bookworm
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: prepare environment
run: |
apt-get update
apt-get install python3-wxgtk4.0 libgtk-3-dev ffmpeg cmake --no-install-recommends -y
pip install pipenv -U --quiet
pipenv run pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04/ wxPython
pipenv install --dev
- name: run tests
run: |
pipenv run test
sonarqube_checks:
name: SonarQube Checks
runs-on: ubuntu-24.04
needs:
- mypy_lint
- tests
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: prepare environment
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev python3-setuptools python3-wxgtk4.0 python3.12 ffmpeg --no-install-recommends -y
pip install pipenv -U --quiet
pipenv run pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04/ wxPython
pipenv install --dev
- name: run coverage report
run: |
pipenv run coverage
- name: generate requirements.txt
run: |
pipenv requirements --dev > requirements.txt
- name: Dependency check
uses: dependency-check/Dependency-Check_Action@main
id: Dependency_check
with:
project: "Video Language Detection"
path: "."
format: HTML
out: "reports"
args: >
--failOnCVSS 7
--enableRetired
--enableExperimental
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}