Skip to content

Commit 1336015

Browse files
chore: nightly job (#52)
* chore: nightly job * tweak * tweak * fix * fix * . * . * . * . * . * . * clean up * add ios * remove ios * cleanup * .
1 parent 21c6565 commit 1336015

File tree

3 files changed

+107
-1
lines changed

3 files changed

+107
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ permissions:
1010
actions: read
1111
contents: read
1212

13+
concurrency:
14+
group: ci-${{ github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
main:
1519
runs-on: ubuntu-latest

.github/workflows/nightly.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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

scripts/verdaccio-reset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

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

0 commit comments

Comments
 (0)