Skip to content

Instantly share code, notes, and snippets.

@grndvl1
Created October 13, 2023 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grndvl1/5686203dbf41f7c2d122662468850738 to your computer and use it in GitHub Desktop.
Save grndvl1/5686203dbf41f7c2d122662468850738 to your computer and use it in GitHub Desktop.
CIRCLECI and Not Fail a Run Step Command
# CircleCI I had a time where I wanted the UI tests to not stop the build because I would run another script to do some
# Test case management and report the findings but I still wanted a build to diagnose or triage the issue for devs.
# I finally found out how to do so by making the gradlew build/run tests command always return 0 by a simple
# CircleCI option
commands:
test_ui:
steps:
# running a gradle managed device that by this command starts the emulator and runs the UI tests
# adding the '|| true' makes it always return true
- run:
name: UI Tests
command: ./gradlew pixel2api31DebugAndroidTest || true
- run:
name: Finding Artifacts
command: | ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment