Skip to content
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ permissions:
actions: read
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Nighlty

on:
# Runs every night at 2 AM
schedule:
- cron: '0 2 * * *'
# Manaual trigger
workflow_dispatch:

concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: true

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.11.0

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4

- name: Typecheck and lint
run: pnpm lint typecheck

- name: Run tests
run: pnpm test
Comment on lines +32 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's no need to run typecheck or unit tests, for nightlies we're only interested in build, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this for extra safety. Normally we only run lint/typecheck/test only of affected packages (as nx decides), Here we are running it on all of them.


- name: Build framework
run: pnpm build

- name: Publish framework to Verdaccio
run: |
pnpm verdaccio:init &
npx [email protected] http://localhost:4873
pnpm verdaccio:publish

- name: Run end-to-end tests
run: |
NPM_CONFIG_REGISTRY=http://localhost:4873 pnpm e2e

build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.11.0

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
cache: gradle

- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4

- name: Build framework
run: pnpm build

- name: Publish framework to Verdaccio
run: |
pnpm verdaccio:init &
npx [email protected] http://localhost:4873
pnpm verdaccio:publish

- name: Deploy template
run: |
cd ..
NPM_CONFIG_REGISTRY=http://localhost:4873 pnpm create @callstack/rnef-app \
--registry http://localhost:4873 \
NightlyDeploy \
--template=default \
--platform=ios --platform=android \
--plugin=metro

cd NightlyDeploy
NPM_CONFIG_REGISTRY=http://localhost:4873 \
NPM_CONFIG_NODE_LINKER=hoisted \
pnpm install

- name: Build Android template
run: |
cd ../NightlyDeploy
pnpm rnef build:android
2 changes: 1 addition & 1 deletion scripts/verdaccio-reset.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

npm config set registry https://registry.npmjs.org/
echo "link-workspace-packages=true\nauto-install-peers=true" > ~/.npmrc
echo "link-workspace-packages=true\nauto-install-peers=true" > .npmrc
rm -rf /tmp/verdaccio-storage
Loading