mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-11 09:46:05 +00:00
* Upgrade GitHub Actions for Node 24 compatibility Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com> * ci: update remaining checkout pins --------- Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com> Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com> Co-authored-by: 易良 <1204183885@qq.com> Co-authored-by: yiliang114 <effortyiliang@gmail.com>
96 lines
2.9 KiB
YAML
96 lines
2.9 KiB
YAML
name: 'Terminal Bench Tests'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'feat/tbench*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'The version to test.'
|
|
required: true
|
|
type: 'string'
|
|
default: 'latest'
|
|
release:
|
|
types: ['published']
|
|
|
|
jobs:
|
|
terminal-bench:
|
|
name: 'Terminal Bench (Task: ${{ matrix.task_id }})'
|
|
runs-on: 'ubuntu-latest'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
task_id:
|
|
- 'hello-world'
|
|
- 'swe-bench-astropy-1'
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # v6.0.3
|
|
with:
|
|
submodules: 'recursive'
|
|
- name: 'Install uv and set the python version'
|
|
uses: 'astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39' # v8.2.0
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: 'Set up Node.js 22.x'
|
|
uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0
|
|
with:
|
|
node-version: '22.x'
|
|
cache: 'npm'
|
|
cache-dependency-path: 'package-lock.json'
|
|
registry-url: 'https://registry.npmjs.org/'
|
|
|
|
- name: 'Configure npm for rate limiting'
|
|
run: |-
|
|
npm config set fetch-retry-mintimeout 20000
|
|
npm config set fetch-retry-maxtimeout 120000
|
|
npm config set fetch-retries 5
|
|
npm config set fetch-timeout 300000
|
|
|
|
- name: 'Install dependencies'
|
|
run: |-
|
|
npm ci --prefer-offline --no-audit --progress=false
|
|
|
|
- name: 'Build project'
|
|
run: |-
|
|
npm run build
|
|
|
|
- name: 'Run Terminal Bench Oracle (task: ${{ matrix.task_id }})'
|
|
run: 'npm run test:terminal-bench:oracle'
|
|
timeout-minutes: 30
|
|
env:
|
|
CI: 'true'
|
|
NODE_ENV: 'test'
|
|
VERBOSE: 'true'
|
|
KEEP_OUTPUT: 'true'
|
|
TB_TASK_ID: '${{ matrix.task_id }}'
|
|
TB_TIMEOUT_MINUTES: '30'
|
|
|
|
- name: 'Run Terminal Bench Qwen (task: ${{ matrix.task_id }})'
|
|
run: 'npm run test:terminal-bench:qwen'
|
|
timeout-minutes: 30
|
|
env:
|
|
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
|
|
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
|
|
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
|
|
CI: 'true'
|
|
NODE_ENV: 'test'
|
|
VERBOSE: 'true'
|
|
KEEP_OUTPUT: 'true'
|
|
TB_TASK_ID: '${{ matrix.task_id }}'
|
|
TB_TIMEOUT_MINUTES: '30'
|
|
|
|
- name: 'Upload test artifacts'
|
|
if: 'always()'
|
|
uses: 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' # v7.0.1
|
|
with:
|
|
name: 'terminal-bench-${{ matrix.task_id }}-output'
|
|
path: |
|
|
.integration-tests/**
|
|
!.integration-tests/**/*.lock
|
|
!.integration-tests/**/tb.lock
|
|
integration-tests/**/*.log
|
|
if-no-files-found: 'warn'
|
|
retention-days: 7
|