Skip to content

Commit

Permalink
Merge pull request #1114 from dotintent/fix/react_native_colors_requi…
Browse files Browse the repository at this point in the history
…re_node_18

fix: add node version variable
  • Loading branch information
dominik-czupryna-withintent authored Oct 17, 2023
2 parents 7382fe4 + 0d2a84a commit adae63f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
7 changes: 5 additions & 2 deletions .github/actions/setup_test_project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ inputs:
REACT_NATIVE_VERSION:
description: React Native version to use
required: false
NODE_VERSION:
description: Node version to use # https://github.com/actions/setup-node#supported-version-syntax
required: false

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
node-version: ${{ inputs.NODE_VERSION }}

- name: Initialize project template
run: npx react-native@latest init BlePlxExample --version ${{ inputs.REACT_NATIVE_VERSION }} --directory test_project --skip-install --verbose
Expand All @@ -27,7 +30,7 @@ runs:
restore-keys: |
${{ runner.os }}-${{ inputs.REACT_NATIVE_VERSION }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-${{ inputs.REACT_NATIVE_VERSION }}-yarn-
- name: Copy project files
run: node ./scripts/copyExampleProjectFiles.js
shell: bash
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ jobs:
run: yarn prepack

build-android:
runs-on: ubuntu-latest
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
react_native_version: ['0.72.4', ' 0.71.13', '0.70.13']
configurations:
[
{ react_native_version: '0.72.6', node_version: 18 },
{ react_native_version: '0.71.14', node_version: 16 },
{ react_native_version: '0.70.13', node_version: 16 }
]
env:
TURBO_CACHE_DIR: .turbo/android
steps:
Expand All @@ -62,15 +67,16 @@ jobs:
- name: Setup
uses: ./.github/actions/setup_test_project
with:
REACT_NATIVE_VERSION: ${{ matrix.react_native_version }}
REACT_NATIVE_VERSION: ${{ matrix.configurations.react_native_version }}
NODE_VERSION: ${{ matrix.configurations.node_version }}

- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.react_native_version }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-${{ matrix.configurations.react_native_version }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.react_native_version }}-turborepo-android-
${{ runner.os }}-${{ matrix.configurations.react_native_version }}-turborepo-android-
- name: Check turborepo cache for Android
run: |
Expand Down Expand Up @@ -99,9 +105,9 @@ jobs:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-${{ matrix.react_native_version }}-gradle-${{ hashFiles('test_project/android/gradle/wrapper/gradle-wrapper.properties') }}
key: ${{ runner.os }}-${{ matrix.configurations.react_native_version }}-gradle-${{ hashFiles('test_project/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-${{ matrix.react_native_version }}-gradle-
${{ runner.os }}-${{ matrix.configurations.react_native_version }}-gradle-
- name: Build example for Android
run: |
Expand All @@ -112,7 +118,12 @@ jobs:
strategy:
fail-fast: false
matrix:
react_native_version: ['0.72.4', ' 0.71.13', '0.70.13']
configurations:
[
{ react_native_version: '0.72.6', node_version: 18 },
{ react_native_version: '0.71.14', node_version: 16 },
{ react_native_version: '0.70.13', node_version: 16 }
]
env:
TURBO_CACHE_DIR: .turbo/ios
steps:
Expand All @@ -122,15 +133,16 @@ jobs:
- name: Setup
uses: ./.github/actions/setup_test_project
with:
REACT_NATIVE_VERSION: ${{ matrix.react_native_version }}
REACT_NATIVE_VERSION: ${{ matrix.configurations.react_native_version }}
NODE_VERSION: ${{ matrix.configurations.node_version }}

- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.react_native_version }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-${{ matrix.configurations.react_native_version }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.react_native_version }}-turborepo-ios-
${{ runner.os }}-${{ matrix.configurations.react_native_version }}-turborepo-ios-
- name: Check turborepo cache for iOS
run: |
Expand All @@ -147,9 +159,9 @@ jobs:
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-${{ matrix.react_native_version }}-cocoapods-${{ hashFiles('test_project/ios/Podfile.lock') }}
key: ${{ runner.os }}-${{ matrix.configurations.react_native_version }}-cocoapods-${{ hashFiles('test_project/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.react_native_version }}-cocoapods-
${{ runner.os }}-${{ matrix.configurations.react_native_version }}-cocoapods-
- name: Install cocoapods
if: env.turbo_cache_hit != 1
Expand Down

0 comments on commit adae63f

Please sign in to comment.