Skip to content

Commit

Permalink
Add job to test libraries on nightlies
Browse files Browse the repository at this point in the history
  • Loading branch information
cipolleschi committed Nov 5, 2024
1 parent 0e7ba90 commit fd27378
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/actions/test-library-on-nightly/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test-library-on-nightly
description: Tests a library on a nightly
inputs:
library-base-folder:
description: The base folder for the library
required: true
library-repo:
description: The repo of the library we have to clone
required: true
example-folder-path:
description: the path to the example repository
required: true
default: "example"
platform:
description: whether we want to build for iOS or Android
required: true
runs:
using: composite
steps:
- name: Clone Library
run: git clone ${{ inputs.library-repo }}
- name: Bump react native
run: |
cd ${{ inputs.library-base-folder }}/${{ inputs.example-folder-path }}
yarn add react-native@nightly
- name: Build iOS
if: ${{ ${{ inputs.platform == "ios" }}
run: |
cd ${{ inputs.library-base-folder }}/${{ inputs.example-folder-path }}/ios
pod install
cd ..
yarn ios
- name: Build Android
if: ${{ ${{ inputs.platform == "android" }}
run: |
cd ${{ inputs.library-base-folder }}/${{ inputs.example-folder-path }}
yarn android
87 changes: 87 additions & 0 deletions .github/workflows/test-libraries-on-nightlies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Test Libraries on Nightlies

on:
pull_request: # for testing, remove after it's ready
workflow_dispatch:
inputs:
library-name:
description: The Name of the library
required: true
type: string
library-base-folder:
description: The base folder for the library
required: true
type: string
library-repo:
description: The repo of the library we have to clone
required: true
type: string
example-folder-path:
description: the path to the example repository
required: true
default: "example"
type: string
platform:
description: whether we want to build for iOS or Android
required: true
choice:
- android
- ios

jobs:
# test-library-on-nightly-android:
# name: "[${{ inputs.platform }}] ${{ inputs.library-name }} with Nightlies"
# runs-on: ubuntu-latest
# if: ${{ inputs.platform == "android" }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Test ${{ inputs.library-name }}
# uses: ./.github/actions/test-library-on-nightly
# with:
# library-base-folder: ${{ inputs.library-base-folder }}
# library-repo: ${{ inputs.library-repo }}
# example-folder-path: ${{ inputs.example-folder-path }}
# platform: android

# test-library-on-nightly-ios:
# name: "[${{ inputs.platform }}] ${{ inputs.library-name }} with Nightlies"
# runs-on: macos-13
# if: ${{ inputs.platform == "ios" }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Test ${{ inputs.library-name }}
# uses: ./.github/actions/test-library-on-nightly
# with:
# library-base-folder: ${{ inputs.library-base-folder }}
# library-repo: ${{ inputs.library-repo }}
# example-folder-path: ${{ inputs.example-folder-path }}
# platform: ios
test-library-on-nightly-android:
name: "[Android] react-native-slider with Nightlies"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test react-native-slider
uses: ./.github/actions/test-library-on-nightly
with:
library-base-folder: react-native-slider
library-repo: https://github.com/callstack/react-native-slider
example-folder-path: example
platform: android

test-library-on-nightly-ios:
name: "[iOS] react-native-slider with Nightlies"
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test react-native-slider
uses: ./.github/actions/test-library-on-nightly
with:
library-base-folder: react-native-slider
library-repo: https://github.com/callstack/react-native-slider
example-folder-path: example
platform: ios

0 comments on commit fd27378

Please sign in to comment.