gpt4 book ai didi

travis-ci - 忽略 postgresql 的 .travis.yml 版本设置

转载 作者:行者123 更新时间:2023-12-04 18:37:12 26 4
gpt4 key购买 nike

以下在 my .travis.yml :

addons:
postgresql: "9.3"
before_script:
- psql --version
- psql -c 'SELECT version();' -U postgres

我得到以下输出:
$ psql --version
$ psql (PostgreSQL) 9.4.0
$ psql -c 'SELECT version();' -U postgres

PostgreSQL 9.1.14 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit

显然这里有问题,但我不确定如何告诉 Travis 实际使用我指定的 postgres 版本。我关注了 the instructions in Travis Docs .这似乎是一个错误。

这是一个问题,因为我使用的是新的 json列类型,因此出现以下错误:
PG::UndefinedObject: ERROR:  type "json" does not exist

最佳答案

我看了一下,您遇到的本质上是我们的 YAML 解析如何处理重复键的错误。解决我们如何处理这个问题是我们正在努力的事情。

你有两个 addons:您的 .travis.yml 中的 key 文件

  • https://github.com/orientation/orientation/blob/f9850e86a97eff77298f54ce68ca0a07c173e81a/.travis.yml#L6-L7
  • https://github.com/orientation/orientation/blob/f9850e86a97eff77298f54ce68ca0a07c173e81a/.travis.yml#L39-L41

  • 发生的情况是 最后 关键获胜,您的 postgres 内容将被默默丢弃。

    如果您像下面这样组合它们,它将按需要工作。

    addons:
    postgres: "9.3"
    code_climate:
    repo_token: 75408d377a0b3c1ab512bf3fb634617bccf2a1065f8c513e352139427ec8e1fb

    https://github.com/solarce/orientation/commit/8dd4c1c10b8470ff3529af1d6591d619f211354dhttps://travis-ci.org/solarce/orientation/jobs/83220170举个例子

    如果您有任何其他问题,请随时联系 support@travis-ci.com

    关于travis-ci - 忽略 postgresql 的 .travis.yml 版本设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32872000/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com