这就是我做一些短信测试(eslint)的方法。
View view;
LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(R.layout.myLayout, null);
Button btn;
btn = (Button) view.findViewWithTag(R.id.btnWithTag);
btn.setVisibility(View.GONE);
但是有了这个,每个测试都必须将软件包安装到ubuntu映像上,这需要时间。
所以我想用这个来构建一个图像。我想出了这个Dockerfile:
linter:
image: ubuntu:16.04
stage: test
tags:
- testing
before_script:
- apt-get update -y
- apt-get install nodejs-legacy -yqq
- apt-get install curl -yqq
- curl https://install.meteor.com/ | sh
- meteor npm install eslint eslint-plugin-react
script:
- ./node_modules/.bin/eslint --ext .js --ext .jsx .
然后我做
FROM ubuntu:16.04
RUN apt-get update -y
RUN apt-get install nodejs-legacy -yqq
RUN apt-get install curl -yqq
RUN apt-get clean && apt-get autoclean && apt-get autoremove
RUN curl https://install.meteor.com/ | sh
和这个yml文件:
$ docker build -t linter-testing:latest .
但它失败了这个错误:
linter:
image: linter-testing:latest
stage: test
tags:
- testing
before_script:
- meteor npm install eslint eslint-plugin-react
script:
- ./node_modules/.bin/eslint --ext .js --ext .jsx .
那么为什么这张图片不存在,而ERROR: Job failed: Error response from daemon: repository linter-testing not found: does not exist or no pull access
向我展示了那张图片......