hanabhi/gridworld-env
0
1name: Tests2 3on:4 pull_request:5 branches:6 - main7 - release8 push:9 branches:10 - main11 workflow_dispatch: # Allow manual trigger12 13jobs:14 test:15 runs-on: ubuntu-latest16 strategy:17 fail-fast: false18 matrix:19 python-version: ["3.11", "3.12"]20 21 steps:22 - name: Checkout code23 uses: actions/checkout@v424 25 - name: Install uv26 uses: astral-sh/setup-uv@v427 with:28 version: "latest"29 30 - name: Set up Python ${{ matrix.python-version }}31 run: uv python install ${{ matrix.python-version }}32 33 - name: Install dependencies34 run: |35 uv sync --all-extras36 uv pip install pytest pytest-asyncio numpy nltk smolagents python-chess moonfish37 38 - name: Run tests39 run: |40 uv run pytest tests/ \41 --ignore=tests/envs/test_browsergym_environment.py \42 --ignore=tests/envs/test_dipg_environment.py \43 --ignore=tests/envs/test_websearch_environment.py \44 -m "not integration and not network and not docker" \45 -v \46 --tb=short47 env:48 PYTHONPATH: src:envs49 50 lint:51 runs-on: ubuntu-latest52 steps:53 - name: Checkout code54 uses: actions/checkout@v455 56 - name: Install uv57 uses: astral-sh/setup-uv@v458 with:59 version: "latest"60 61 - name: Set up Python62 run: uv python install 3.1163 64 - name: Install dependencies65 run: |66 uv sync --all-extras67 uv pip install ruff usort68 69 - name: Run import sort + format check70 run: |71 # Replicate the arc f pipeline: usort then ruff format72 uv run usort format src/ tests/73 uv run ruff format src/ tests/74 # If any files changed, they weren't properly formatted75 if [ -n "$(git diff --name-only -- '*.py')" ]; then76 echo "ERROR: Files not properly formatted. Run:"77 echo " uv run usort format src/ tests/ && uv run ruff format src/ tests/"78 git diff --name-only -- '*.py'79 exit 180 fi81 82 - name: Run ruff lint check83 run: uv run ruff check src/ tests/84 