Skip to content

feat: implement code quality improvements #259

feat: implement code quality improvements

feat: implement code quality improvements #259

Workflow file for this run

name: CI
on:
push:
branches:
- master
- dev
pull_request:
schedule:
# run CI every day even if no PRs/merges occur
- cron: '0 12 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
tests:
name: CI (Python ${{ matrix.python }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["ubuntu-latest", "macos-latest", "windows-2022"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: python
with:
python-version: ${{ matrix.python }}
- name: Create Python virtual environment
run: |
${{ steps.python.outputs.python-path }} -m venv test-venv
- name: Install solc-select and test dependencies
shell: bash
run: |
source test-venv/${{ (runner.os == 'Windows' && 'Scripts') || 'bin' }}/activate
python -m pip install --upgrade pip
pip3 install -e ".[dev]"
- name: Run Tests
shell: bash
run: |
source test-venv/${{ (runner.os == 'Windows' && 'Scripts') || 'bin' }}/activate
# Run pytest with appropriate platform markers
# Skip slow tests (upgrade test) and version_boundaries tests in CI
python -m pytest tests/ -v --tb=short -k "not version_boundaries" -m "not slow"
comprehensive-tests:
name: Comprehensive Tests (Python ${{ matrix.python }} on ${{ matrix.os }})
# Only run on schedule or when labeled 'full-tests'
if: github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'full-tests')
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ["3.11"] # Run comprehensive tests on one Python version
os: ["ubuntu-latest", "macos-latest", "windows-2022"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install solc-select and test dependencies
run: |
python -m pip install --upgrade pip
pip3 install -e ".[dev]"
- name: Run Comprehensive Tests
run: |
# Run ALL tests including slow and version_boundaries
python -m pytest tests/ -v --tb=short