【问题标题】:Github action failing react test, running locallyGithub 操作未通过反应测试,在本地运行
【发布时间】:2022-01-26 21:32:48
【问题描述】:

我的测试套件在 GH 操作(和本地)中运行良好。突然它们不再运行(仍在本地运行)。问题似乎是由于某种原因异步函数超时:

Timed out in waitForNextUpdate after 1000ms.

我的 .yml 文件与操作:

name: Webapp test and build

on:
  pull_request:
    branches: [ dev ]
    types: [opened, closed]

jobs:
  test_build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x]
    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
      with:
        token: ${{ secrets.GIT_TOKEN }}
        fetch-depth: 0
      
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'yarn'
        
    - name: Install packages
      run: yarn install
        
    - name: Run Tests
      run: yarn test

再一次,在节点 14 和相同的 repo 上测试本地运行。任何提示或帮助深表感谢

【问题讨论】:

    标签: reactjs testing github-actions


    【解决方案1】:

    事实证明,我在 Github 操作中缺少环境变量。为什么测试最初在 GH 动作中通过仍然是一个谜......

    【讨论】:

      猜你喜欢
      • 2021-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-11
      • 2022-07-07
      • 2013-03-23
      • 1970-01-01
      • 2021-06-08
      相关资源
      最近更新 更多