Skip to content

Instantly share code, notes, and snippets.

@haigopi
Last active August 24, 2020 18:11
Show Gist options
  • Save haigopi/503d4903389317b0d0d834668c86af02 to your computer and use it in GitHub Desktop.
Save haigopi/503d4903389317b0d0d834668c86af02 to your computer and use it in GitHub Desktop.
workflows:
version: 2
commit:
jobs:
- build
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- build
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:8-jdk-browsers
parallelism: 1
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx3200m
TERM: dumb
steps:
- add_ssh_keys:
fingerprints:
- "2f:6b:14:f1:02:52:ea:6f:as:e0:b4:42:gt:59:33:bd"
- checkout
#- run: mkdir test-reports
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: gradle dependencies
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
# run tests!
- run:
# This is just for debugging purposes, you can omit this step
name: test splitting output
command: circleci tests glob "src/test/java/com/generic/functional/automation/ui/tests/**/*.java" | circleci tests split --split-by=timings | xargs -n 1 echo
#- run: gradle test --tests com.generic.functional.automation.ui.tests.login.LoginLogoutAutomation
- run: gradle test
#- run: gradle check -i -PtestFilter="`circleci tests glob "src/test/java/com/generic/functional/automation/ui/tests/**/*.java" | circleci tests split --split-by=timings`"
- run: git config user.email "[email protected]"
- run: git config user.name "Gopi from Circle CI"
- run: git pull
- run: cd /home/circleci/repo/test-output
- run: ls -la && git add -A
- run: git commit -m "[skip ci] test result"
- run: git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment