Skip to content

Commit

Permalink
ci: added circle ci config for OAuth app e2e.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyd1997 committed Dec 17, 2023
1 parent 31cc211 commit 1597428
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1

orbs:
# The Node.js orb contains a set of prepackaged CircleCI configuration you can utilize
# Orbs reduce the amount of configuration required for common tasks.
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/node
node: circleci/[email protected]
macos: circleci/macos@2

jobs:
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
generate:
# These next lines define a Docker executor: https://circleci.com/docs/executor-types/
# You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
# A list of available CircleCI Docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/node
macos:
xcode: 15.1.0
environment:
GITHUB_WORKSPACE: '.'
JHI_REACT_NATIVE_APP_NAME: 'OauthApp'
JHI_AUTH_TYPE: 'oauth2'
JHI_DTO: 'false'
JHIPSTER_VERSION: 7
SCRIPT_DIR: ./test/scripts
PLATFORM: ios
JHI_RECORD_VIDEO: ${{ github.event.inputs.recordVideo || 'false' }}
JHI_SCREENSHOTS: ${{ github.event.inputs.screenshots || 'false' }}
# Then run your tests!
# CircleCI will report the results back to your VCS provider.
steps:
# Checkout the code as the first step.
- checkout
- node/install:
node-version: '16'
- run: node --version
- run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
- run:
name: Install Homebrew
command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- run:
name: Verify Homebrew installation
command: brew --version && brew update
# - run:
# name: Install Java 11
# command: brew install java11 && sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
# - run:
# name: Verify Java Version
# command: java --version
- run:
name: 'TOOLS: installing Detox and its dependencies'
command: $SCRIPT_DIR/install-detox.sh
- run:
name: Config git variables
command: $SCRIPT_DIR/git-config.sh
- run:
name: 'TOOLS: install node dependencies'
command: $SCRIPT_DIR/install-node-dependencies.sh
# - node/install-packages:
# # If you are using yarn, change the line below from "npm" to "yarn"
# pkg-manager: npm
- run:
name: 'TOOLS: display tools'
command: $SCRIPT_DIR/display-tools.sh
- run:
name: 'TOOLS: npm install and link in generator-jhipster-react-native'
command: npm i && npm link
- run:
name: 'SETUP: copy the JDL file for the backend and app'
command: $SCRIPT_DIR/copy-jdl-file.sh
- run:
name: 'GENERATING: generate jhipster backend'
command: $SCRIPT_DIR/generate-jhipster-backend.sh
- run:
name: 'GENERATING: generate react-native app'
command: $SCRIPT_DIR/generate-react-native-app.sh
# - macos/preboot-simulator:
# version: "17.0"
# platform: "iOS"
# device: "iPhone 15"
- run:
name: 'TESTING: run detox tests'
command: pwd && ls && $SCRIPT_DIR/run-detox-tests.sh
- run:
name: 'TESTING: rename detox screenshots to a valid filename'
command: $SCRIPT_DIR/rename-detox-screenshots.sh
# Next, the node orb's install-packages step will install the dependencies from a package.json.
# The orb install-packages step will also automatically cache them for faster future runs.
# - node/install-packages:
# # If you are using yarn, change the line below from "npm" to "yarn"
# pkg-manager: npm

workflows:
# Below is the definition of your workflow.
# Inside the workflow, you provide the jobs you want to run, e.g this workflow runs the build-and-test job above.
# CircleCI will run this workflow on every commit.
# For more details on extending your workflow, see the configuration docs: https://circleci.com/docs/configuration-reference/#workflows
iOS-E2E:
jobs:
- generate
# # - jhipster
# - generate:
# requires:
# - jhipster
# For running simple node tests, you could optionally use the node/test job from the orb to replicate and replace the job above in fewer lines.
# - node/test

0 comments on commit 1597428

Please sign in to comment.