【问题标题】:Appveyor not running the build scriptAppveyor 没有运行构建脚本
【发布时间】:2021-02-10 10:23:50
【问题描述】:

您好,我的构建脚本没有创建构建脚本,原因我不知道,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 中收到的确切消息,因为构建没有创建它没有运行测试并说它是成功的。

【问题讨论】:

    标签: reactjs azure continuous-integration yaml appveyor


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-23
      • 1970-01-01
      • 2020-08-14
      • 1970-01-01
      相关资源
      最近更新 更多