任何人都可以在npm命令上建议安装.cirlceci / config.yml以进行赛普拉斯测试

问题描述 投票:0回答:1

我们正在为我们的项目准备Circleci CI / CD管道。我将需要设置cypress测试以在CircleCi管道上运行。任何人都可以建议有关npm install命令在根文件夹下创建circle.yml or .circleci/config.yml file的信息:

enter image description here

cypress circleci
1个回答
0
投票

这是我的circle.yml的示例,它位于我的项目根目录:

version: 2.1
jobs:
  test:
    docker:
    - image: cypress/base:10
    steps:
    - checkout
    - restore_cache:
        keys:
        - cache-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}
    - run:
        name: Yarn install
        command: yarn install --frozen-lockfile
    - save_cache:
        key: cache-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}
        paths:
        - ~/.cache
    - run:
        command: yarn lint
    - run:
        command: yarn test
    - run:
        command: yarn test-e2e
    - run:
        command: yarn run semantic-release
workflows:
  build:
    jobs:
    - test
  version: 2

您可以用cypress cli命令替换yarn test-e2e,例如npm run cypress:run

© www.soinside.com 2019 - 2024. All rights reserved.