CircleCI容器步骤显示“构建已取消”,并且尽管所有测试都运行并通过了,但缺少绿色的选中标记

时间:2020-09-30 19:17:34

标签: mongodb docker circleci circleci-2.0

我已经将CircleCI集成到我的应用程序中,这样,推送到Github的每个分支都将针对它运行测试,并且只有在所有测试通过后才能与master合并。它可以正常工作,但是在查看https://app.circleci.com/上的步骤时,我观察到了一些特殊的行为。

以下是相关图片和演示此问题的我的配置文件。

CircleCI容器步骤显示“构建已取消”,并且尽管所有测试都运行并通过了,但缺少绿色的选中标记

Container step showing ‘Build was cancelled’ although all tests run and pass

config.yml

# JavaScript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:13.0.1
      - image: mongo:4.2.1

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-

      - run: 
          name: Install Dependencies
          command: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      # run tests!
      - run:
          name: Run Tests
          command: jest --ci --runInBand --detectOpenHandles --forceExit
          environment:
            MONGODB_URL: mongodb://127.0.0.1:27017/app-name

感谢您的帮助!

0 个答案:

没有答案