Skip to content

Improving Adversarial PPCA and randomization #2137

Improving Adversarial PPCA and randomization

Improving Adversarial PPCA and randomization #2137

Workflow file for this run

name: Python Lint and Test
on:
pull_request:
paths:
- "perl/**"
- "python/**"
- "go/**"
- "config/**"
jobs:
build:
name: Python Lint and Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.3"
cache: true
- name: Set up virtual environment # needed for maturin
run: |
python -m venv ~/.venv/ci-venv
- name: Install dependencies
run: |
source ~/.venv/ci-venv/bin/activate
python -m pip install --upgrade pip
pip install -r python/requirements-dev.txt
make develop
- name: Linting with Ruff
run: |
source ~/.venv/ci-venv/bin/activate
cd python && ruff $(git ls-files '*.py')
- name: Static analysis with MyPy
run: |
source ~/.venv/ci-venv/bin/activate
mypy --version
mypy --config-file python/mypy.ini $(git ls-files '*.py')
- name: Tests
run: |
source ~/.venv/ci-venv/bin/activate
cd python && pytest --durations=0