Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-zimerman committed Jan 31, 2024
1 parent 77b4f1c commit e35b683
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/buildandtest.yml
Expand Up @@ -32,8 +32,6 @@ jobs:
job_lint:
name: Lint
runs-on: ubuntu-latest
needs: [diff_check]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
Expand Down Expand Up @@ -128,6 +126,7 @@ jobs:
job_type_check:
name: Type Check Typescript 3.8
runs-on: ubuntu-latest
needs: [job_build]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -166,6 +165,7 @@ jobs:
job_circular_dep_check:
name: Circular Dependency Check
runs-on: ubuntu-latest
needs: [job_build]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/codegen.yml
Expand Up @@ -10,14 +10,11 @@ on:
uses: ./.github/workflows/skip-ci.yml

jobs:
check-ci:
uses: ./.github/workflows/skip-ci.yml

codegen:
runs-on: ubuntu-latest
strategy:
matrix:
platform: ['android', 'ios']
platform: ["android", "ios"]
include:
- platform: android
command: |
Expand All @@ -37,7 +34,7 @@ jobs:
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
distribution: "adopt"
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- uses: actions/cache@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -26,6 +26,7 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
Expand Down
59 changes: 21 additions & 38 deletions .github/workflows/e2e.yml
Expand Up @@ -15,9 +15,6 @@ env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

jobs:
check-ci:
uses: ./.github/workflows/skip-ci.yml

cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
Expand All @@ -33,7 +30,7 @@ jobs:
fail-fast: false
matrix:
rn-architecture: ['legacy', 'new']
platform: ['ios', 'android']
platform: ["ios", "android"]
include:
- platform: ios
runs-on: macos-latest
Expand All @@ -51,7 +48,7 @@ jobs:
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
distribution: "adopt"
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: Install Global Dependencies
Expand All @@ -62,8 +59,7 @@ jobs:
path: |
node_modules
test/perf/TestAppSentry/node_modules
key:
${{ github.workflow }}-${{ github.job }}-${{ hashFiles('yarn.lock', 'test/perf/TestAppSentry/yarn.lock') }}
key: ${{ github.workflow }}-${{ github.job }}-${{ hashFiles('yarn.lock', 'test/perf/TestAppSentry/yarn.lock') }}
- name: Install Dependencies
if: steps.deps-cache.outputs['cache-hit'] != 'true'
run: yarn install
Expand All @@ -81,9 +77,7 @@ jobs:
# if the whole plain app folder is hashed the cache is never hit as there are files generated in the folder
# the cache key is calculated both at cache retrieval and save time
# hashFiles fails when there are rn android new arch generated files in the folder (exact reason unknown)
key:
${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ matrix.rn-architecture }}-${{
hashFiles('test/perf/TestAppPlain/yarn.lock') }}
key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ matrix.rn-architecture }}-${{ hashFiles('test/perf/TestAppPlain/yarn.lock') }}
- name: Build app plain
if: steps.app-plain-cache.outputs['cache-hit'] != 'true'
working-directory: ./test/perf/TestAppPlain
Expand Down Expand Up @@ -152,9 +146,7 @@ jobs:
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }}

react-native-build:
name:
Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{
matrix.build-type }} ${{ matrix.ios-use-frameworks }}
name: Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
runs-on: ${{ matrix.runs-on }}
env:
RN_SENTRY_POD_NAME: RNSentry
Expand Down Expand Up @@ -283,9 +275,7 @@ jobs:

- name: Download Plain RN ${{ matrix.rn-version }} App
working-directory: test/react-native/versions
run:
git clone $RN_DIFF_REPOSITORY --branch release/${{ matrix.rn-version }} --single-branch ${{ matrix.rn-version
}}
run: git clone $RN_DIFF_REPOSITORY --branch release/${{ matrix.rn-version }} --single-branch ${{ matrix.rn-version }}

- name: Add SDK to App
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
Expand Down Expand Up @@ -390,37 +380,28 @@ jobs:
if: matrix.platform == 'android' && matrix.build-type == 'production'
uses: actions/upload-artifact@v3
with:
name:
${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{
matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
path: apk.tar
retention-days: 1

- name: Upload App APP
if: matrix.platform == 'ios' && matrix.build-type == 'production'
uses: actions/upload-artifact@v3
with:
name:
${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{
matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
path: app.tar
retention-days: 1

- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name:
rn-build-logs-${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{
matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}
name: rn-build-logs-${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}
path: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios/*.log

react-native-test:
name:
Test RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{
matrix.build-type }} ${{ matrix.ios-use-frameworks }}
needs: [react-native-build]

name: Test RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
needs: react-native-build
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false # keeps matrix running if one fails
Expand Down Expand Up @@ -465,9 +446,7 @@ jobs:
if: matrix.build-type == 'production'
uses: actions/download-artifact@v3
with:
name:
${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{
matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-app-package
path: test/e2e

- name: Extract App Package
Expand Down Expand Up @@ -560,8 +539,14 @@ jobs:
target: 'aosp_atd'
channel: canary # Necessary for ATDs
emulator-options: >
-no-window -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
-camera-front none -timezone US/Pacific
-no-window
-no-snapshot-save
-gpu swiftshader_indirect
-noaudio
-no-boot-anim
-camera-back none
-camera-front none
-timezone US/Pacific
script: |
# Collect logs
adb logcat '*:D' 2>&1 >adb.log &
Expand All @@ -581,9 +566,7 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name:
${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{
matrix.build-type }}-${{ matrix.ios-use-frameworks }}-logs
name: ${{ matrix.rn-version }}-${{ matrix.rn-architecture }}-${{ matrix.engine }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks }}-logs
path: |
test/e2e/*.log
test/e2e/*.png
23 changes: 16 additions & 7 deletions .github/workflows/native-tests.yml
Expand Up @@ -8,9 +8,6 @@ on:
uses: ./.github/workflows/skip-ci.yml

jobs:
check-ci:
uses: ./.github/workflows/skip-ci.yml

cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -98,8 +95,14 @@ jobs:
target: 'aosp_atd'
channel: canary # Necessary for ATDs
emulator-options: >
-no-window -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
-camera-front none -timezone US/Pacific
-no-window
-no-snapshot-save
-gpu swiftshader_indirect
-noaudio
-no-boot-anim
-camera-back none
-camera-front none
-timezone US/Pacific
script: echo "Generated AVD snapshot for caching."

- name: Run connected tests
Expand All @@ -113,8 +116,14 @@ jobs:
target: 'aosp_atd'
channel: canary # Necessary for ATDs
emulator-options: >
-no-window -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
-camera-front none -timezone US/Pacific
-no-window
-no-snapshot-save
-gpu swiftshader_indirect
-noaudio
-no-boot-anim
-camera-back none
-camera-front none
-timezone US/Pacific
script: |
./gradlew uninstallDebug uninstallDebugAndroidTest
./gradlew connectedCheck
3 changes: 0 additions & 3 deletions .github/workflows/sample-application.yml
Expand Up @@ -16,9 +16,6 @@ env:
RN_SENTRY_POD_NAME: RNSentry

jobs:
check-ci:
uses: ./.github/workflows/skip-ci.yml

cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit e35b683

Please sign in to comment.