-
Notifications
You must be signed in to change notification settings - Fork 36
chore: nightly job #52
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
Merged
+107
−1
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
18b4a69
chore: nightly job
mdjastrzebski b55c4b7
tweak
mdjastrzebski 227709a
tweak
mdjastrzebski 9c8ca78
fix
mdjastrzebski 3dc6812
fix
mdjastrzebski 760ea1e
.
mdjastrzebski 9d88f45
.
mdjastrzebski 45537b8
.
mdjastrzebski 4b8bce1
.
mdjastrzebski bffa4ec
.
mdjastrzebski 9c12772
.
mdjastrzebski 6f7e84d
clean up
mdjastrzebski a3b8b93
add ios
mdjastrzebski bc677ed
remove ios
mdjastrzebski e5c7c8c
cleanup
mdjastrzebski c5dbfda
.
mdjastrzebski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| - 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.