From 902be06c46aab248d9a368266ff7773189f1e0a5 Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Mon, 4 May 2020 14:35:27 -0700 Subject: [PATCH] Update CI and README --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ .github/workflows/main.yml | 21 --------------------- README.md | 36 +++++++++++++++++++++++++++++------- 3 files changed, 53 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..ab647b10 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: ci +on: [push, pull_request] +jobs: + build-android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm i -g electrode-native && ern + - run: yarn + - working-directory: android/ + run: ./gradlew createAndPublishErnDevContainer + - working-directory: android/ + run: ./gradlew assembleDebug test lint + build-ios: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm i -g electrode-native && ern + - run: yarn + - run: yarn createiOSContainer + - working-directory: ios/moviesreloadedMiniApp/ + run: xcodebuild -project "ErnRunner.xcodeproj" -scheme "ErnRunner" -destination "platform=iOS Simulator,name=iPhone 11,OS=13.4.1" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 51070ca3..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: main -on: [push, pull_request] -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [10.x, 12.x, 13.x] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install Electrode Native CLI - run: npm i -g electrode-native && ern - - name: Install dependencies - run: yarn - - name: Create and publish dev container - working-directory: android/ - run: ./gradlew createAndPublishErnDevContainer diff --git a/README.md b/README.md index 5858c3f9..d9e1e559 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,35 @@ [![Actions Status][1]][2] -Native implementation for the [`ernnavigation-api`](https://github.com/electrode-io/ern-navigation-api#electrode-native-navigation-api) +Native implementation of [`ernnavigation-api`][3]. -Please run `yarn createiOSContainer` to create the iOS Container at -`ios/container`. Afterwards, in Xcode, you can either build the ElectrodeApiImpl -project at `ios/ElectrodeApiImpl.xcodeproj` or you can run the -moviesreloadedMiniApp at `/ios/moviesreloadedMiniApp/ErnRunner.xcodeproj` to try -Electrode Native Navigation on iOS side. +## Getting Started -[1]: https://github.com/electrode-io/ernnavigation-api-impl-native/workflows/main/badge.svg +### Android + +Inside the `android/` directory, run the following command: + +```sh +./gradlew createAndPublishErnDevContainer +``` + +The container will be created in a temporary directory and published to the +local Maven repository (`~/.m2`), from where it will be consumed by the library +project. + +### iOS + +Create the iOS Container: + +```sh +yarn createiOSContainer +``` + +After opening the `ios/` directory in Xcode (`xed ios`), you can either build +the ElectrodeApiImpl project at `ios/ElectrodeApiImpl.xcodeproj` or you can run +the moviesreloadedMiniApp at `/ios/moviesreloadedMiniApp/ErnRunner.xcodeproj` +to try Electrode Native Navigation on iOS side. + +[1]: https://github.com/electrode-io/ernnavigation-api-impl-native/workflows/ci/badge.svg [2]: https://github.com/electrode-io/ernnavigation-api-impl-native/actions +[3]: https://github.com/electrode-io/ern-navigation-api#electrode-native-navigation-api