Skip to content

Tests

Tests #190

Workflow file for this run

name: Test ADIM
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: python -m pip install -r requirements.txt -r test-requirements.txt pycodestyle
- name: Code style check
run: pycodestyle --max-line-length=120 .
- name: Unit tests
run: python -m pytest adim/test --cov=adim --cov-report=term
sec-tests:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: python -m pip install bandit
- name: Security tests
run: bandit -r adim -lll -iii -x tests/*
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
db-location: ${{ runner.temp }}/codeql-db
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3