v0.1.0rc2 #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.12", "3.13"] | |
java-version: ["11", "17", "21"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Java ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: ${{ matrix.java-version }} | |
- name: Install system dependencies (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install uv | |
uv sync --frozen | |
- name: Verify Java installation | |
run: | | |
java -version | |
echo "JAVA_HOME: $JAVA_HOME" | |
- name: Set Java environment variables (Ubuntu/macOS) | |
if: matrix.os != 'windows-latest' | |
run: | | |
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$JAVA_HOME/lib/server:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
- name: Set Java environment variables (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
echo "JAVA_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV | |
echo "PATH=$env:JAVA_HOME\bin;$env:PATH" >> $env:GITHUB_ENV | |
- name: Run type checking with mypy | |
run: | | |
uv run mypy --config-file pyproject.toml src/ tests/ | |
- name: Run linting with flake8 | |
run: | | |
uv run flake8 src/ tests/ | |
- name: Run tests with pytest | |
run: | | |
uv run pytest -v --tb=short | |
lint-and-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Set up Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install uv | |
uv sync --frozen | |
- name: Check code formatting with black | |
run: | | |
uv run black --check --diff src/ tests/ | |
- name: Check import sorting with isort | |
run: | | |
uv run isort --check-only --diff src/ tests/ |