- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在过去的两天里,我一直在寻找使用 Expo + Detox + CircleCI 的良好设置,以便应用程序可以在 CI 过程中构建。
在本地,我可以通过下载 Exponent.app 并放入 bin 并运行 expo start(在不同的终端中)来使 Expo + Detox 工作。然而,expo start 在 Circle CI 中是阻塞的,所以有没有一种有效的方法来实现这一点。
我查看了很多示例,但没有找到一个带有更新示例的明确回应,考虑到 Expo 的受欢迎程度,这是一种耻辱。
如果有人有您可以共享的示例 CircleCI 文件,那就太好了!或者确实有助于解释实现这一目标的流程。
我很欣赏这也是 Detox 和 CircleCI 的问题,但我想我会在这里添加它,因为许多人可能也想知道答案?
我目前的 Circle-CI 代码,我一直在反复尝试找到一个有效的解决方案......
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
defaults: &defaults
working_directory: ~/iynk-react-app
jobs:
test:
<<: *defaults
docker:
- image: circleci/node:10
steps:
- checkout
- run:
name: Update npm
command: 'sudo npm install -g npm@latest'
- run:
name: Install Firebase Tools
command: sudo npm install -g firebase-tools@latest
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run: yarn test
- run:
name: Install modules in functions
command: yarn --cwd ./functions --ignore-engines
e2e:
<<: *defaults
macos:
xcode: "10.2.1"
steps:
- run:
# Note: the [ character is necessary to uniquely identify the iPhone 8 simulator, as the phone + watch simulator is also present in the build image:
# Will show what looks like an error - Instruments Usage Error: Unknown device specified: "iPhone 8 (12.2) [") - but it launch
name: Pre-start simulator first to ensure that it is open
command: xcrun instruments -w "iPhone 8 (12.2) [" || true
- checkout
- restore_cache:
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
- restore_cache:
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
- run: yarn install --ignore-engines
- save_cache:
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
paths:
- ~/.cache/yarn
- save_cache:
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
paths:
- node_modules
- run:
name: Install applesimutils
command: |
brew tap wix/brew
brew install applesimutils
- run:
name: Install react-native, detox CLI and expo CLI
command: |
npm install -g react-native-cli
npm install -g detox-cli
npm install -g expo-cli
- run:
name: Prepare detox environment
command: |
detox clean-framework-cache &&
detox build-framework-cache
- run:
name: Download Exponent.app into bin
command: |
brew install wget
./scripts/setup.sh
# - run:
# name: Install the downloaded version of the expo iOS app on the Simulator
# command: |
# xcrun simctl install booted ./bin/Exponent.app
# - run:
# name: Login into Expo and publish to staging
# command: |
# npx expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD
# npx expo publish --non-interactive --max-workers 1 --release-channel staging
- run:
name: Run expo locally using (&) Run detox tests
# shell: /bin/sh
command: |
yarn test:e2e &
expo start -c
workflows:
version: 2
build_and_test:
jobs:
- test
- e2e
"detox": "12.3.0",
"detox-expo-helpers": "^0.6.0",
"expo-detox-hook": "^1.0.10",
brew update
brew tap wix/brew
brew install --HEAD applesimutils
npm install -g detox-cli
./setup.sh
expo start -c
i
从博览会虽然,只需打开模拟器程序。
open -a Simulator.app
yarn test:e2e
- run:
name: Login into Expo and publish to staging (could update with $CIRCLE_BRANCH)
command: |
npx expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD --non-interactive
npx expo publish --non-interactive --max-workers 1 --release-channel testing
beforeAll(async () => {
await detox.init(config);
// Run from the remote build if in CI
if (__CI__) {
const url = 'exp://exp.host/@alexpchin/iynk?release-channel=testing';
await device.relaunchApp({ url, sourceApp: 'host.exp.exponent' });
await expect(element(by.label('Got it'))).toBeVisible();
await element(by.label('Got it')).tap();
}
});
beforeEach(async () => {
await adapter.beforeEach();
// If not CI, use `reloadApp` from `detox-expo-helpers`
if (!__CI__) {
await reloadApp();
}
});
最佳答案
仍然没有答案或更新,所以我会尽量提供我的。
据我了解,您想要自动化的流程是 test on Simulator .所附链接中列出了步骤。
即对于 iOS
expo build:ios -t simulator
expo build:status (or expo url:ipa)
tar -xvzf your-app.tar.gz
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID `xcrun instruments -s | grep "iPhone 7 (12.2)" -m1 | cut -d "[" -f2 | cut -d "]" -f1`
xcrun simctl install booted <app path>
xcrun simctl launch booted <app identifier>
关于react-native - 世博会 + 排毒 + CircleCI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56817500/
我试图通过将环境变量 (SHORT_HASH) 作为命令 ('echo $CIRCLE_SHA1 | cut -c -7') 运行来将其设置为更短的 github 哈希。 所以,我希望将散列“b1e5
我将在 CircleCI 作业的第一步中生成一个 UID。有没有办法将此值存储为可供后续步骤访问的“管道参数”?另外,有没有办法在作业之间传递此类动态参数? 类似这样的事情 jobs: bui
这简直要了我的命,找不到答案...我只想将当前用户从 root 更改为预先创建的名为“node”的用户,并给定“node:9”基础镜像。 这是我现在拥有的 .circleci/config.yml 文
在 Cicrle 上存储敏感信息(例如签名配置、API key 等)的位置,而不将它们添加到 git。通常我不会将此类文件上传到 git 存储库,但我不知道如何在没有它们的情况下使用 Circle 最
我有一个圆形 CI 环境,我想在其中动态分配上下文以部署到 4 个不同的环境。 理想情况下,我想使用管道参数设置上下文,有什么想法可以实现这一点吗? 我希望如何实现这一目标的示例: parameter
CircleCI 有一个 CIRCLE_BRANCH 环境变量,它告诉您 PR 本身的分支名称。 但我想反过来,我需要 PR 试图合并的分支名称。 最佳答案 您可以简单地通过使用 github api
如果我有一个 .circleci/config.yml文件像这样: version: 2 jobs: build-node8: docker: - image: oresoft
是否可以在另一个作业的上下文中运行另一个作业?我有一些工作有一些共同的步骤,我不想在不同的工作中重复这些步骤。 push-production-image: docker: - image: go
我已经设法创建了一个 CircleCI 构建,它使用 curl 使用他们的 API 触发后续构建。 .我已将此添加到我的 circle.yml : test: override: - mvn t
有办法做到这一点吗? 例如,我目前总是在 Circle.yml 文件中安装特定版本的 docker-compose,但我希望已经通过缓存安装它: - sudo -H pip install -U do
CircleCI 2.0 上是否提供 Android Espresso 的仪器测试?如果是的话,有人可以帮我配置 config.yml 文件吗?我已经尝试了数千次,但没有成功。我可以运行单元测试,但不
我想使用 Open JDK 8 和 9 运行我的 Circle CI 2.0 构建。是否有任何可用的 YAML 示例解释如何使用多个 JDK 版本构建 Java 项目? 目前我正在尝试将新作业 jav
Yarn 没有关于 2.0 安装的文档。 索取文档🙏 这里是 1.0 文档 https://circleci.com/docs/1.0/yarn/ 2.0在哪里? https://circleci.
CircleCi 在代码被推送到 master 时运行,但是 CircleCi 在名为 Version Package Bump 的运行脚本中推送到 master 本身。因此,在第一次构建之后,将运行
在 CircleCI 中,我运行一个应用程序,我想针对它运行测试: test: pre: # run app - ./gradlew bootRun -Dgrails.env=de
基本上我试图跳过构建,如果它不是拉取请求或某个分支,但是如果失败,我似乎无法跳过工作或工作流程的一部分,到目前为止问题是 circleci step halt在我的管道中什么都不做,这里的示例配置:
当我与master合并时,我想使用CircleCI将我的docker镜像推送到Dockerhub。我在其他项目中使用 CircleCI,它更有用并且希望保持一致(并且我计划稍后添加测试)。然而,我所有
我正在使用CircleCI设置持续的部署过程,以Google Container Engine为目标。我正在关注this documentation和this example。 我在这个阶段陷入困境:
有没有办法缓存我从 bundler (使用 bundle 安装)获得的依赖项?我知道我可以在 circle.yml 中使用 cache_dependencies 命令,但我不确定要传递给它的路径是什么
摘自 CircleCI 配置文件: deploy: machine: enabled: true steps: - run: name: AWS EC2 dep
我是一名优秀的程序员,十分优秀!