Skip to content

Pyproject toml

Pyproject toml #451

name: Regression Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint-flake8:
runs-on: ubuntu-latest
name: flake8
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.11
- name: flake8
run: |
pip install flake8
flake8 --ignore=E501,W503,W504
tests:
name: Python ${{matrix.python-version}} | ${{matrix.sim}}
runs-on: ubuntu-24.04
env:
SIM: ${{matrix.sim}}
strategy:
fail-fast: false
matrix:
include:
- sim: icarus
python-version: '3.11'
- sim: icarus
python-version: '3.10'
- sim: verilator
sim-version: 5.044
python-version: '3.10'
pytest-marker: "-m verilator"
steps:
- uses: actions/checkout@v6
- name: Set up miniforge ${{matrix.python-version}}
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: ${{matrix.python-version}}
conda-remove-defaults: "true" # explicitly remove conda default channel in favor of conda-forge
- name: Install verilator
if: matrix.sim == 'verilator'
shell: bash -l {0}
run: |
conda install verilator==${{matrix.sim-version}}
- name: Install Icarus Verilog
if: matrix.sim == 'icarus'
run: |
sudo apt install -y --no-install-recommends iverilog
- name: Install Python dependencies
shell: bash -l {0}
run: |
pip install pyvisa pyvisa-sim pytest coverage coveralls pytest-cov cocotb>=2 cocotb-bus
- name: Install basil
shell: bash -l {0}
run: |
pip install -e .
- name: Test
shell: bash -l {0}
run: |
pytest ${{matrix.pytest-marker}} --cov=basil tests/test_*.py examples/*/*/test_*.py
- name: Upload to codecov
shell: bash -l {0}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}