传送器未运行构建脚本

时间:2020-10-28 04:08:15

标签: reactjs azure continuous-integration yaml appveyor

你好我的构建脚本由于我不知道的原因未创建构建脚本,Packjson的正确脚本是

 "build": "npm run silentrenew && react-scripts --max_old_space_size=8192 build",

我已经仔细检查了我的YML文件和所有标签

version: '1.0.{build}'
image: Ubuntu
init:
  - cmd: set NODE_OPTIONS=--max-old-space-size=8192
environment:
  REACT_APP_VSA_URL: >-
    https://xzc-e-n-vsa0000-d-api-02.xzc-e-n-snt-06-ut-ase-01.p.azurewebsites.net
  REACT_APP_NOTIFICATIONS_API_SECRET: d8015bf6cab64573b2d7c17bac94bed4
  REACT_APP_EVENT_LOG_SECRET: 3431cec7ecbb42bba1957934c751f02d
install:
  - cmd: npm ci --ignore-scripts
build_script:
  - cmd: |-
      npm --no-git-tag-version version "%APPVEYOR_BUILD_VERSION%"
      npm run build
test_script:
  - cmd: 'npm run test:ci'
artifacts:
  - path: ./build
    name: dpe
deploy:
  - provider: Environment
    name: dpe-dev
    'on':
      branch:
        - internal
        - tablet
on_finish:
  - pwsh: >-
      # upload results to AppVeyor

      $wc = New-Object 'System.Net.WebClient'

      $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)",
      (Resolve-Path .\coverage\junit\junit.xml))

      # upload coverage results to CodeCov

      $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH

      Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh

      bash codecov.sh -s "./coverage/jest/"

这是我在AppVeyor中收到的确切消息,因为构建没有创建,它没有运行测试并说它成功。

enter image description here

1 个答案:

答案 0 :(得分:1)

对于Linux构建,前缀必须为sh:或根本没有前缀:

build_script:
  - sh: |-
      npm --no-git-tag-version version "$APPVEYOR_BUILD_VERSION"
      npm run build