Skip to content

Instantly share code, notes, and snippets.

@batazo
Forked from transitive-bullshit/.gitlab-ci.yml
Created January 24, 2024 00:33
Show Gist options
  • Save batazo/8377941851fd3387c41be65e5e30394f to your computer and use it in GitHub Desktop.
Save batazo/8377941851fd3387c41be65e5e30394f to your computer and use it in GitHub Desktop.

Revisions

  1. @transitive-bullshit transitive-bullshit created this gist Jun 19, 2019.
    44 changes: 44 additions & 0 deletions .gitlab-ci.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    stages:
    - E2E

    .ios_base:
    tags:
    - macOS
    - swiftlint
    cache:
    paths:
    - node_modules
    - ios/vendor
    before_script:
    - npm i
    - cd ios
    - bundle install --without=documentation --deployment

    Detox:
    extends: .ios_base
    stage: Detox
    variables:
    E2E: "true"
    tags:
    - macOS
    - simulator
    only:
    - merge_requests
    before_script:
    - xcodebuild -version
    - node --version
    - brew tap wix/brew > /dev/null 2>&1
    - brew install applesimutils > /dev/null 2>&1
    - npm i -g npx > /dev/null 2>&1
    - rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/haste-*
    - rm -rf ios/build
    - killall node || echo
    - xcrun simctl shutdown all
    script:
    - E2E=true npm start -- --port 8081 &
    - npx detox build > /dev/null 2>&1
    - npx detox test --cleanup --loglevel info
    - kill -9 $(lsof -n -i4TCP:8081)
    after_script:
    - xcrun simctl shutdown all
    - (if [ "$(lsof -n -i4TCP:8081)" != "" ]; then kill -9 $(lsof -n -i4TCP:8081); else echo "Cleaned"; exit 33; fi);