← 所有代码文件

.gitlab-ci.yml

使用 Node 镜像的 GitLab CI 流水线,含 test 和 build 阶段。

image: node:22

stages:
  - test
  - build

cache:
  paths:
    - node_modules/

test:
  stage: test
  script:
    - npm ci
    - npm test

build:
  stage: build
  script:
    - npm run build
  artifacts:
    paths:
      - dist/

关于此工具

使用 Node 镜像的 GitLab CI 流水线,含 test 和 build 阶段。

开箱即用的 .gitlab-ci.yml——查看内容、复制,或以正确的文件名下载。免费,100% 在浏览器中运行。