【问题标题】:Run npm test only once, not autowatch只运行一次 npm test,而不是 autowatch
【发布时间】:2021-04-07 18:57:49
【问题描述】:

我刚刚在我的 GitHub 存储库上创建了这个基于 npm 的 Ionic 测试

name: Ionic test

on:
  pull_request:
    branches:
    - 'v*'
    - master

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x]

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm install
    - run: npm test

但是在它结束之后

TOTAL: 33 SUCCESS
TOTAL: 33 SUCCESS

工作流程不会停止。它一直在旋转,并且 PR 的状态保持不变

Some checks haven’t completed yet

我尝试删除 karma.conf.js 中的 // autoWatch: true,,但它仍然在 CLI 和 GitHub 上继续旋转。不知道如何让npm test 只运行一次。

【问题讨论】:

    标签: github npm karma-jasmine karma-runner


    【解决方案1】:

    好的,用karma.conf.js解决了

        autoWatch: false,
        browsers: ['ChromeHeadless'],
        singleRun: true,
    

    GitLab 现在完成了我的工作。

    【讨论】:

      猜你喜欢
      • 2022-12-24
      • 2012-12-08
      • 1970-01-01
      • 2017-01-26
      • 1970-01-01
      • 2020-01-05
      • 2018-08-19
      • 2022-11-23
      • 2019-06-09
      相关资源
      最近更新 更多