Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: improve workflows #513

Merged
merged 23 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Setup
description: Setup Node.js and install dependencies

inputs:
registry-url:
description: Optional registry to set up for auth.

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

- name: Enable Corepack for yarn v4
run: corepack enable
shell: bash

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ updates:
interval: "weekly"
# Disable version updates for npm dependencies
open-pull-requests-limit: 0

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
16 changes: 0 additions & 16 deletions .github/label-actions.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/stale.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/android-actions.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/build-react-native-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build React Native Android

on:
workflow_call:

jobs:
build:
name: Build
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./packages/react-native-app

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Setup Azul Zulu OpenJDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21

- name: Build Android
run: ./gradlew assemble
working-directory: packages/react-native-app/android
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: iOS Build & Detox
name: Build React Native iOS & Test with Detox

on:
workflow_call:
inputs:
NVMRC:
required: true
type: string

jobs:
build:
name: Build
runs-on: macos-latest
timeout-minutes: 45 # Figure out why this job can be super slow; runner hardware?
timeout-minutes: 30

defaults:
run:
Expand All @@ -20,16 +17,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node ${{ inputs.NVMRC }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.NVMRC }}

- name: Enable Corepack
run: corepack enable

- name: Install Yarn Dependencies
run: yarn install --immutable --check-cache
- name: Setup
uses: ./.github/actions/setup

- name: Install Pod Dependencies
run: cd ios && pod --version && pod install
Expand All @@ -38,9 +27,10 @@ jobs:
run: |
brew tap wix/brew
brew install applesimutils
yarn detox clean-framework-cache && yarn detox build-framework-cache

- name: Build for detox
- name: Build iOS
run: yarn detox build -c ios.sim.release

- name: Test with detox
- name: Test with Detox
run: yarn detox test --debug-synchronization 200 -c ios.sim.release
17 changes: 0 additions & 17 deletions .github/workflows/label-actions.yml

This file was deleted.

84 changes: 0 additions & 84 deletions .github/workflows/on-push.yml

This file was deleted.

Loading