Skip to content

Specify base images for mini-nightmare and aider #1720

Specify base images for mini-nightmare and aider

Specify base images for mini-nightmare and aider #1720

Workflow file for this run

name: "Tests"
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '30 8 * * *'
jobs:
test-swebench:
name: "Testing SWE-Bench"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
language: [ "python" ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/test-if-changes
with:
name: swebench
test-files: "tests/gym/envs/test_swe_bench.py"
changed-files: |
debug_gym/gym/envs/swe_bench.py
tests/gym/envs/test_swe_bench.py
test-swesmith:
name: "Testing SWE-Smith"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
language: [ "python" ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/test-if-changes
with:
name: swesmith
test-files: "tests/gym/envs/test_swe_smith.py"
changed-files: |
debug_gym/gym/envs/swe_smith.py
tests/gym/envs/test_swe_smith.py
test-r2egym:
name: "Testing R2E-Gym"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
language: [ "python" ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/test-if-changes
with:
name: r2egym
test-files: "tests/gym/envs/test_r2egym.py"
changed-files: |
debug_gym/gym/envs/r2egym.py
tests/gym/envs/test_r2egym.py
test-kubernetes:
name: "Testing Kubernetes"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
language: [ "python" ]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v5
- name: start minikube
id: minikube
uses: medyagh/setup-minikube@latest
- name: kubectl
run: kubectl get pods -A
- uses: ./.github/actions/test-if-changes
with:
name: kubernetes
test-files: "tests/gym/terminals/test_kubernetes.py"
changed-files: |
debug_gym/gym/terminals/kubernetes.py
tests/gym/terminals/test_kubernetes.py
tests:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
language: [ "python" ]
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e '.[dev]'
- name: Test - PR - Fast
env:
ALLOW_LOCAL_TERMINAL: true
DEBUG_GYM_DEBUG: 1
run: |
pytest -vv -n 16 -k "not test_swe_bench and not test_swe_smith and not test_r2egym and not test_kubernetes" --timeout=600 --cov=debug_gym --cov-report=term-missing
- name: Store coverage report
uses: actions/upload-artifact@v4
with:
name: .coverage-main
path: .coverage
if-no-files-found: error
include-hidden-files: true
report-coverage:
runs-on: ubuntu-latest
needs: [tests, test-swebench, test-swesmith, test-r2egym, test-kubernetes]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install dependencies
run: pip install coverage
- name: Download coverage reports
uses: actions/download-artifact@v4
- name: Combine and report coverage.
run: |
ls -la
# The artifacts are downloaded as directories, but coverage combine expects files
# Move the .coverage files from directories to the current directory
for dir in .coverage-*; do
if [ -d "$dir" ] && [ -f "$dir/.coverage" ]; then
cp "$dir/.coverage" "${dir}.coverage"
echo "Moved coverage file from $dir to ${dir}.coverage"
fi
done
ls -la .*.coverage
coverage combine --keep .*.coverage
coverage report --fail-under=85