mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-19 07:54:38 +00:00
GitHub Actions deprecates the Node 20 runtime; older versions of every docker/* action run on Node 20 and emit the "Node.js 20 actions are deprecated" warning in every release / e2e / image-build run today. Each action shipped a "Node 24 as default runtime" major: - docker/setup-buildx-action v3 → v4 (2026-03-05) - docker/setup-qemu-action v3 → v4 - docker/metadata-action v5 → v6 - docker/login-action v3 → v4 - docker/build-push-action v6 → v7 None of our usages touch the deprecated inputs removed in the bumps — release.yml / e2e.yml call setup-buildx with no `with:` block, and build-and-publish-image.yml only passes the universally-supported `images` / `tags` / `registry` / `username` / `password` / `context` / `platforms` / `push` / `labels` / `build-args` inputs. ESM internal refactor of each action is transparent to consumers. Ratchet-pinned bumps use the v4.0.0 commit SHA `4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd` (release.yml + e2e.yml). Other action references in build-and-publish-image.yml use `# ratchet:exclude` per existing convention, so version-string bumps suffice there. Verified runtime hosts (`actions/runner` v2.327.1+) are already in use on github-hosted runners as of 2026-03; no infra bump required. Co-authored-by: 秦奇 <gary.gq@alibaba-inc.com>
125 lines
3.9 KiB
YAML
125 lines
3.9 KiB
YAML
name: 'E2E Tests'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'feat/e2e/**'
|
|
merge_group:
|
|
|
|
concurrency:
|
|
group: |-
|
|
${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'main' || github.run_id }}
|
|
cancel-in-progress: |-
|
|
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
e2e-test-linux:
|
|
name: 'E2E Test (Linux) - ${{ matrix.sandbox }}'
|
|
runs-on: 'ubuntu-latest'
|
|
strategy:
|
|
matrix:
|
|
sandbox:
|
|
- 'sandbox:none'
|
|
- 'sandbox:docker'
|
|
node-version:
|
|
- '22.x'
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
|
|
|
|
- name: 'Set up Node.js ${{ matrix.node-version }}'
|
|
uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0
|
|
with:
|
|
node-version: '${{ matrix.node-version }}'
|
|
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: 'Bundle CLI for E2E tests'
|
|
run: |-
|
|
npm run bundle
|
|
|
|
- name: 'Set up Docker'
|
|
if: |-
|
|
${{ matrix.sandbox == 'sandbox:docker' }}
|
|
uses: 'docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd' # ratchet:docker/setup-buildx-action@v4
|
|
|
|
- name: 'Set up Podman'
|
|
if: |-
|
|
${{ matrix.sandbox == 'sandbox:podman' }}
|
|
uses: 'redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603' # ratchet:redhat-actions/podman-login@v1
|
|
with:
|
|
registry: 'docker.io'
|
|
username: '${{ secrets.DOCKERHUB_USERNAME }}'
|
|
password: '${{ secrets.DOCKERHUB_TOKEN }}'
|
|
|
|
- name: 'Run E2E tests'
|
|
env:
|
|
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
|
|
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
|
|
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
|
|
KEEP_OUTPUT: 'true'
|
|
VERBOSE: 'true'
|
|
run: |-
|
|
if [[ "${{ matrix.sandbox }}" == "sandbox:docker" ]]; then
|
|
npm run test:integration:sandbox:docker
|
|
else
|
|
npm run test:integration:sandbox:none
|
|
fi
|
|
|
|
e2e-test-macos:
|
|
name: 'E2E Test - macOS'
|
|
runs-on: 'macos-latest'
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
|
|
|
|
- name: 'Set up Node.js'
|
|
uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
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: 'Bundle CLI for E2E tests'
|
|
run: |-
|
|
npm run bundle
|
|
|
|
- name: 'Run E2E tests'
|
|
env:
|
|
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
|
|
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
|
|
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
|
|
run: 'npm run test:e2e'
|