|
| 1 | +name: Nighlty |
| 2 | + |
| 3 | +on: |
| 4 | + # Runs every night at 2 AM |
| 5 | + schedule: |
| 6 | + - cron: '0 2 * * *' |
| 7 | + # Manaual trigger |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: nightly-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +jobs: |
| 15 | + validate: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - uses: pnpm/action-setup@v4 |
| 21 | + with: |
| 22 | + version: 9.11.0 |
| 23 | + |
| 24 | + - uses: actions/setup-node@v4 |
| 25 | + with: |
| 26 | + node-version: 20 |
| 27 | + cache: 'pnpm' |
| 28 | + |
| 29 | + - run: pnpm install --frozen-lockfile |
| 30 | + - uses: nrwl/nx-set-shas@v4 |
| 31 | + |
| 32 | + - name: Typecheck and lint |
| 33 | + run: pnpm lint typecheck |
| 34 | + |
| 35 | + - name: Run tests |
| 36 | + run: pnpm test |
| 37 | + |
| 38 | + - name: Build framework |
| 39 | + run: pnpm build |
| 40 | + |
| 41 | + - name: Publish framework to Verdaccio |
| 42 | + run: | |
| 43 | + pnpm verdaccio:init & |
| 44 | + npx [email protected] http://localhost:4873 |
| 45 | + pnpm verdaccio:publish |
| 46 | +
|
| 47 | + - name: Run end-to-end tests |
| 48 | + run: | |
| 49 | + NPM_CONFIG_REGISTRY=http://localhost:4873 pnpm e2e |
| 50 | +
|
| 51 | + build-android: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v4 |
| 55 | + |
| 56 | + - uses: pnpm/action-setup@v4 |
| 57 | + with: |
| 58 | + version: 9.11.0 |
| 59 | + |
| 60 | + - uses: actions/setup-node@v4 |
| 61 | + with: |
| 62 | + node-version: 20 |
| 63 | + cache: 'pnpm' |
| 64 | + |
| 65 | + - name: Install Java |
| 66 | + uses: actions/setup-java@v4 |
| 67 | + with: |
| 68 | + java-version: 17 |
| 69 | + distribution: adopt |
| 70 | + cache: gradle |
| 71 | + |
| 72 | + - run: pnpm install --frozen-lockfile |
| 73 | + - uses: nrwl/nx-set-shas@v4 |
| 74 | + |
| 75 | + - name: Build framework |
| 76 | + run: pnpm build |
| 77 | + |
| 78 | + - name: Publish framework to Verdaccio |
| 79 | + run: | |
| 80 | + pnpm verdaccio:init & |
| 81 | + npx [email protected] http://localhost:4873 |
| 82 | + pnpm verdaccio:publish |
| 83 | +
|
| 84 | + - name: Deploy template |
| 85 | + run: | |
| 86 | + cd .. |
| 87 | + NPM_CONFIG_REGISTRY=http://localhost:4873 pnpm create @callstack/rnef-app \ |
| 88 | + --registry http://localhost:4873 \ |
| 89 | + NightlyDeploy \ |
| 90 | + --template=default \ |
| 91 | + --platform=ios --platform=android \ |
| 92 | + --plugin=metro |
| 93 | +
|
| 94 | + cd NightlyDeploy |
| 95 | + NPM_CONFIG_REGISTRY=http://localhost:4873 \ |
| 96 | + NPM_CONFIG_NODE_LINKER=hoisted \ |
| 97 | + pnpm install |
| 98 | +
|
| 99 | + - name: Build Android template |
| 100 | + run: | |
| 101 | + cd ../NightlyDeploy |
| 102 | + pnpm rnef build:android |
0 commit comments