Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Codecov configuration:
# - CPU/GPU coverage reports are uploaded with separate flags
# - Codecov auto-merges them per commit/PR and reports back via status checks
coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%

flags:
cpu-tests:
carryforward: true
gpu-tests:
carryforward: true

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false
62 changes: 62 additions & 0 deletions .github/workflows/ci-cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: tests-cpu

on:
pull_request:
branches: [ "main" ]
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# ============ Job: test in cpu ============
test-cpu:
runs-on: ubuntu-latest
timeout-minutes: 60

# tested in certain python version
strategy:
matrix:
python-version: [ "3.12" ]

steps:
# 1. git clone code
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true

# 2. set up python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

# 3. install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt

git clone --branch v4.1.0 https://github.com/princeton-nlp/SWE-bench.git
cd SWE-bench
pip install -e .

# 4. Test with pytest
- name: Test with pytest
run: |
pip install pytest pytest-cov pytest-custom_exit_code
export PYTHONPATH="${PYTHONPATH}:${GITHUB_WORKSPACE}"
pytest tests/uni_agent/ -m="cpu and level0" --suppress-no-test-exit-code --cov=./uni_agent/ --cov-report=xml --cov-report=term

- name: Upload CPU coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: cpu-tests
92 changes: 92 additions & 0 deletions .github/workflows/ci-gpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: tests-gpu

on:
pull_request:
branches: [ "main" ]
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
IMAGE: "verl-ci-cn-beijing.cr.volces.com/verlai/verl:vllm018.dev1"
DYNAMIC_RUNNER_ENDPOINT: "https://sh6mtrbg8demerkmc1uhk.apigateway-cn-beijing.volceapi.com/runner/create/runner"

jobs:
# ============ Job: test in gpu ============
setup:
runs-on: ubuntu-latest
outputs:
runner-label: ${{ steps.create-runner.outputs.runner-label }}
mlp-task-id: ${{ steps.create-runner.outputs.mlp-task-id }}
steps:
- id: create-runner
uses: volcengine/vemlp-github-runner@v1
with:
mode: "create"
faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}"
mlp-image: "${{ env.IMAGE }}"

test-gpu:
needs: setup
runs-on: [ "${{ needs.setup.outputs.runner-label || 'L20x8' }}" ]
timeout-minutes: 60

# tested in certain python version
strategy:
matrix:
python-version: [ "3.12" ]

steps:
# 1. git clone code
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true

# 2. set up python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

# 3. install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt -i https://pypi.org/simple

git clone --branch v4.1.0 https://github.com/princeton-nlp/SWE-bench.git
cd SWE-bench
pip install -e .

# 4. Test with pytest
- name: Test with pytest
run: |
pip install pytest pytest-cov pytest-custom_exit_code
export PYTHONPATH="${PYTHONPATH}:${GITHUB_WORKSPACE}"
pytest tests/uni_agent/ -m="gpu and level0" --suppress-no-test-exit-code --cov=./uni_agent/ --cov-report=xml --cov-report=term

- name: Upload GPU coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: gpu-tests

cleanup:
runs-on: ubuntu-latest
needs: [ setup, test-gpu ]
if: always()
steps:
- id: destroy-runner
uses: volcengine/vemlp-github-runner@v1
with:
mode: "destroy"
faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}"
mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}"
95 changes: 29 additions & 66 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,29 @@
name: Python Backend CI

on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main" ]
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
test-and-build:
runs-on: ubuntu-latest
timeout-minutes: 60

# tested in multi python version
strategy:
matrix:
python-version: [ "3.11", "3.12" ]

steps:
# 1. git clone code
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true

# 2. set up python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

# 3. install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt

git clone --branch v4.1.0 https://github.com/princeton-nlp/SWE-bench.git
cd SWE-bench
pip install -e .

# 4. Test with pytest
- name: Test with pytest
run: |
pip install pytest pytest-cov
export PYTHONPATH="${PYTHONPATH}:${GITHUB_WORKSPACE}"
pytest tests/uni_agent/ -m="cpu and level0" --cov=./uni_agent/ --cov-report=xml --cov-report=term

# 5. Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
# This file is used for old workflow, which changes name, to pass required tests.
# The file will be removed lately.
name: Python Backend CI

on:
pull_request:
branches: [ "main" ]
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
test-and-build:
runs-on: ubuntu-latest
timeout-minutes: 60

# tested in multi python version
strategy:
matrix:
python-version: [ "3.11", "3.12" ]

steps:
- name: info
run: echo "deprecation workflow, will be removed lately"
Loading