Implementation:Axolotl ai cloud Axolotl CI Test Workflow
| Knowledge Sources | |
|---|---|
| Domains | CI_CD, Testing |
| Last Updated | 2026-02-07 00:00 GMT |
Overview
GitHub Actions workflow that orchestrates the full Axolotl continuous integration test suite across multiple Python and PyTorch version matrices.
Description
The tests.yml workflow is the primary CI pipeline for the Axolotl project. It runs on push to main, pull requests, and merge queue events. The workflow contains multiple job stages: pre-commit linting, unit tests (pytest) across a Python (3.11, 3.12) and PyTorch (2.8.0, 2.9.0, 2.9.1) matrix, source distribution testing, a gated end-to-end GPU test pipeline using Modal for self-hosted runners, and a cleanup stage. It implements concurrency controls to cancel superseded runs, caches HuggingFace model artifacts from S3, and uploads coverage to Codecov.
Usage
This workflow triggers automatically on pushes to main, pull requests modifying Python files, requirements, or workflow definitions, and manual dispatch. Contributors do not invoke it directly; it runs as part of the GitHub Actions CI system. The [skip-e2e] token in commit messages or PR titles/bodies skips the GPU-based end-to-end tests.
Code Reference
Source Location
- Repository: Axolotl
- File: .github/workflows/tests.yml
- Lines: 1-401
Signature
name: Tests
on:
merge_group:
push:
branches: ["main"]
paths: ['**.py', 'requirements.txt', '.github/workflows/*.yml', ...]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
pre-commit: # Lint checks
pytest: # Unit tests (matrix: python x pytorch)
pytest-sdist: # Tests from source distribution
gate-skip-e2e: # Check for [skip-e2e] token
docker-e2e-tests-1st: # Initial GPU e2e gate
docker-e2e-tests: # Full GPU e2e matrix
docker-e2e-cleanup: # Cache cleanup
Import
# Triggered automatically by GitHub Actions. Not imported.
# Manual trigger: gh workflow run tests.yml
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| push event | GitHub webhook | No | Triggers on push to main with matching path filters |
| pull_request event | GitHub webhook | No | Triggers on PR open/sync/reopen/ready |
| workflow_dispatch | Manual | No | Allows manual triggering from GitHub UI |
Outputs
| Name | Type | Description |
|---|---|---|
| Test results | GitHub check status | Pass/fail for each matrix combination |
| coverage.xml | Codecov upload | Code coverage report uploaded per matrix entry |
Usage Examples
Skip E2E Tests
# Add [skip-e2e] to commit message to skip GPU tests
git commit -m "fix typo in docs [skip-e2e]"
Manual Trigger
# Trigger workflow manually via GitHub CLI
gh workflow run tests.yml