Windows workflow (AgileRL/AgileRL)
The Windows workflow from AgileRL/AgileRL, explained and optimized by Latchkey.
CI health: B - good
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the Windows workflow from the AgileRL/AgileRL repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
---
name: Windows
on:
push:
branches: [main, nightly]
paths:
- agilerl/**
- tests/**
- .github/workflows/**
- pyproject.toml
pull_request:
branches: [main, nightly]
paths:
- agilerl/**
- tests/**
- .github/workflows/**
- pyproject.toml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [windows-2025]
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install uv
uv sync --locked --all-groups --extra all
- name: Test with pytest
run: |
uv run pytest --exitfirst -m "not llm" --cov=agilerl --cov-report=term-missing --durations=0 --durations-min=1.0
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
--- name: Windows on: push: branches: [main, nightly] paths: - agilerl/** - tests/** - .github/workflows/** - pyproject.toml pull_request: branches: [main, nightly] paths: - agilerl/** - tests/** - .github/workflows/** - pyproject.toml concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true permissions: contents: read jobs: tests: timeout-minutes: 30 runs-on: ${{ matrix.os }} strategy: fail-fast: false max-parallel: 4 matrix: os: [windows-2025] python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v7 with: enable-cache: true python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install uv uv sync --locked --all-groups --extra all - name: Test with pytest run: | uv run pytest --exitfirst -m "not llm" --cov=agilerl --cov-report=term-missing --durations=0 --durations-min=1.0
What changed
- Add a job timeout so a hung step cannot burn hours of runner time.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Dependency installs
This workflow runs 1 job (4 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.