diff --git a/.actrc b/.actrc new file mode 100644 index 0000000..51e3d88 --- /dev/null +++ b/.actrc @@ -0,0 +1 @@ +-P ubuntu-latest=catthehacker/ubuntu:full-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ad21f6..f214d5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,25 +13,52 @@ concurrency: jobs: test: + name: Run Tests runs-on: ubuntu-latest strategy: matrix: - python-version: - - "3.13" - + python-version: [ "3.13" ] steps: - - name: Checkout code + - name: Checkout Repository uses: actions/checkout@v4 - - name: Install uv + - name: Set Up Python with uv uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} enable-cache: true cache-dependency-glob: "uv.lock" - - name: Install project + - name: Install Project Dependencies run: uv sync --locked --all-extras --dev - - name: Run tests + - name: Run Test Suite run: uv run --with hypothesis pytest src/tests/ -v --hypothesis-profile ci -n auto + env: + OCP_VSCODE_PYTEST: "1" + + examples: + name: Run Examples + runs-on: ubuntu-latest + needs: test + strategy: + matrix: + python-version: [ "3.13" ] + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set Up Python with uv + uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Install Project Dependencies + run: uv sync --locked --all-extras + + - name: Run Examples + run: for f in examples/*/main.py; do echo "Running $f"; uv run python "$f"; done + env: + OCP_VSCODE_PYTEST: "1" diff --git a/examples/slanted/main.py b/examples/slanted/main.py index 6d6c2b9..d9f8716 100644 --- a/examples/slanted/main.py +++ b/examples/slanted/main.py @@ -46,7 +46,7 @@ cap_count = 4 -for _ in range(cap_count - 1): +for i in range(cap_count - 1): last = caps[-1] cap = last.clone() cap.length = last.right.length