diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml new file mode 100644 index 000000000..8d0e220ca --- /dev/null +++ b/.github/workflows/nightly.yaml @@ -0,0 +1,90 @@ +name: React Native Nightly +on: + # Runs every night at 4 AM + schedule: + - cron: '0 4 * * *' + workflow_dispatch: + +# Set minimal permissions by default +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !contains(github.ref, 'main')}} + +jobs: + lint: + runs-on: ubuntu-latest + name: Lint - ${{ matrix.rn-version }} + strategy: + matrix: + rn-version: [latest, next, nightly] + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Setup Node.js and deps (latest) + if: matrix.rn-version == 'latest' + uses: ./.github/actions/setup-deps-rn-latest + + - name: Setup Node.js and deps (next) + if: matrix.rn-version == 'next' + uses: ./.github/actions/setup-deps-rn-next + + - name: Setup Node.js and deps (nightly) + if: matrix.rn-version == 'nightly' + uses: ./.github/actions/setup-deps-rn-nightly + + - name: Lint + run: yarn lint + + typecheck: + runs-on: ubuntu-latest + name: Typecheck - ${{ matrix.rn-version }} + strategy: + matrix: + rn-version: [latest, next, nightly] + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Setup Node.js and deps (latest) + if: matrix.rn-version == 'latest' + uses: ./.github/actions/setup-deps-rn-latest + + - name: Setup Node.js and deps (next) + if: matrix.rn-version == 'next' + uses: ./.github/actions/setup-deps-rn-next + + - name: Setup Node.js and deps (nightly) + if: matrix.rn-version == 'nightly' + uses: ./.github/actions/setup-deps-rn-nightly + + - name: Typecheck + run: yarn typecheck + + test: + runs-on: ubuntu-latest + name: Test - ${{ matrix.rn-version }} + strategy: + matrix: + rn-version: [latest, next, nightly] + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Setup Node.js and deps (latest) + if: matrix.rn-version == 'latest' + uses: ./.github/actions/setup-deps-rn-latest + + - name: Setup Node.js and deps (next) + if: matrix.rn-version == 'next' + uses: ./.github/actions/setup-deps-rn-next + + - name: Setup Node.js and deps (nightly) + if: matrix.rn-version == 'nightly' + uses: ./.github/actions/setup-deps-rn-nightly + + - name: Test + run: yarn test:ci diff --git a/.github/workflows/react-native-latest.yml b/.github/workflows/react-native-latest.yml deleted file mode 100644 index 7881cd00b..000000000 --- a/.github/workflows/react-native-latest.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: React Native Latest -on: - # Runs every night at 2 AM - schedule: - - cron: '0 2 * * *' - # Manual trigger - workflow_dispatch: - -# Set minimal permissions by default -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'main')}} - -jobs: - lint: - runs-on: ubuntu-latest - name: Lint - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-latest - - - name: Lint - run: yarn lint - - typecheck: - runs-on: ubuntu-latest - name: Typecheck - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-latest - - - name: Typecheck - run: yarn typecheck - - test: - runs-on: ubuntu-latest - name: Test - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-latest - - - name: Test - run: yarn test:ci diff --git a/.github/workflows/react-native-next.yml b/.github/workflows/react-native-next.yml deleted file mode 100644 index f8f98b327..000000000 --- a/.github/workflows/react-native-next.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: React Native Next -on: - # Runs every night at 2 AM - schedule: - - cron: '0 2 * * *' - # Manual trigger - workflow_dispatch: - -# Set minimal permissions by default -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'main')}} - -jobs: - lint: - runs-on: ubuntu-latest - name: Lint - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-next - - - name: Lint - run: yarn lint - - typecheck: - runs-on: ubuntu-latest - name: Typecheck - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-next - - - name: Typecheck - run: yarn typecheck - - test: - runs-on: ubuntu-latest - name: Test - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-next - - - name: Test - run: yarn test:ci diff --git a/.github/workflows/react-native-nightly.yml b/.github/workflows/react-native-nightly.yml deleted file mode 100644 index f8cd82f55..000000000 --- a/.github/workflows/react-native-nightly.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: React Native Nightly -on: - # Runs every night at 5 AM - schedule: - - cron: '0 5 * * *' - # Manual trigger - workflow_dispatch: - -# Set minimal permissions by default -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'main')}} - -jobs: - lint: - runs-on: ubuntu-latest - name: Lint - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-nightly - - - name: Lint - run: yarn lint - - typecheck: - runs-on: ubuntu-latest - name: Typecheck - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-nightly - - - name: Typecheck - run: yarn typecheck - - test: - runs-on: ubuntu-latest - name: Test - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Node.js and deps - uses: ./.github/actions/setup-deps-rn-nightly - - - name: Test - run: yarn test:ci