我已经切换到gitlab并使用它们的ci函数。是否可以检查程序输出是否正确?
例如,如果我将下面的.py放入ci中,是否可以检查输出是否为“hello world”?
print("Hello World")
如果ci检测到程序没有打印“hello world”,是否可能使测试失败?
谢谢)
试试这个:
script: - if ! [[ $(./test.py) == 'Hello World' ]]; then exit 1; fi