diff --git a/.github/workflows/detox.yml b/.github/workflows/detox.yml index 43b138827..592c00438 100644 --- a/.github/workflows/detox.yml +++ b/.github/workflows/detox.yml @@ -148,6 +148,9 @@ jobs: - name: Setup uses: ./.github/actions/setup + - name: Install ios-deploy, detox, react-native-cli + run: npm install -g ios-deploy detox-cli react-native-cli + - name: Install Applesimutils run: | brew tap wix/brew @@ -164,7 +167,7 @@ jobs: env: ITBL_API_KEY: ${{secrets.ITERABLE_API_KEY}} ITBL_ID: ${{secrets.ITBL_ID}} - run: yarn detox:start & + run: cd example && yarn detox:start & - name: Run Detox tests env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..78f02e10d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Detox iOS Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + detox-ios: + runs-on: macos-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20.10.0' + + - name: Install dependencies + run: yarn install + + - name: Install example dependencies + run: cd example ; yarn install ; cd - + + - name: Install Pods + run: cd example/ios && pod install && cd ../.. + + - name: Start Metro Bundler + run: yarn example start --reset-cache & + env: + RCT_METRO_PORT: 8081 + + - name: Build the app for testing + run: yarn example detox build --configuration ios.sim.release + + - name: Run Detox tests + run: yarn example detox test --configuration ios.sim.release --cleanup \ No newline at end of file