Skip to content

Our workflow

Our workflow #5

Workflow file for this run

name: SDL tests
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- master
- 'releases/**'
permissions: read-all
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-sdl
cancel-in-progress: true
env:
PYTHON_VERSION: '3.11'
jobs:
sdl_tests:
name: SDL tests
timeout-minutes: 10
defaults:
run:
shell: bash
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Clone sources and tests
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- name: Install Python tests dependencies
run: |
python3 -m pip install flake8 pytest black bandit
- name: Lint with flake8 (WWB)
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --config=./setup.cfg
working-directory: ${{ github.workspace }}/tools/who_what_benchmark
- name: Lint with flake8 (LLM)
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --config=./setup.cfg
working-directory: ${{ github.workspace }}/tools/llm_bench
- name: Bandit tests
run: python -m bandit --recursive --configfile bandit.yml .
- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # v0.32.0
with:
scan-type: 'fs'
scan-ref: '.'
- name: Dependency Review
if: ${{ github.event_name == 'pull_request' }}
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
with:
config-file: './.github/dependency_review.yml'