Skip to content

Commit 645ea85

Browse files
author
Wiktor Jaszczuk
committed
chore: tryfix
1 parent 1b3b071 commit 645ea85

File tree

7 files changed

+45
-8
lines changed

7 files changed

+45
-8
lines changed

.github/actions/setup/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ runs:
1313
- name: Install dependencies
1414
run: yarn install --immutable
1515
shell: bash
16+
17+
- name: Extract repository name from GITHUB_REPOSITORY
18+
shell: bash
19+
run: |
20+
REPO_NAME="${GITHUB_REPOSITORY##*/}"
21+
echo "GITHUB_REPOSITORY_NAME=$REPO_NAME" >> "$GITHUB_ENV"

.github/workflows/test-e2e-android.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
push:
1717
branches:
1818
- main
19+
- 50-e2e-stability
1920

2021
workflow_dispatch:
2122

@@ -78,6 +79,12 @@ jobs:
7879

7980
- name: Setup
8081
uses: ./.github/actions/setup
82+
s
83+
- name: Download artifact
84+
run: |
85+
cd examples/bare-example
86+
npx rnef remote-cache list-all
87+
npx rnef remote-cache download --name "${{ needs.build-release.outputs.artifact-id }}"
8188
8289
- name: Install Maestro
8390
uses: ./.github/actions/installMaestro
@@ -90,10 +97,6 @@ jobs:
9097
sudo udevadm control --reload-rules
9198
sudo udevadm trigger --name-match=kvm
9299
93-
- name: Download artifact
94-
run: |
95-
npx rnef remote-cache download --name "${{ needs.build-release.outputs.artifact-id }}"
96-
97100
- name: AVD cache
98101
uses: actions/cache@v4
99102
id: avd-cache

.github/workflows/test-e2e-ios.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,14 @@ jobs:
7373
with:
7474
fetch-depth: 0
7575

76+
- name: Setup
77+
uses: ./.github/actions/setup
78+
7679
- name: Download artifact
7780
run: |
81+
cd examples/bare-example
7882
npx rnef remote-cache download --name "${{ needs.build-release.outputs.artifact-id }}"
7983
80-
- name: Setup
81-
uses: ./.github/actions/setup
82-
8384
- name: Install Maestro
8485
uses: ./.github/actions/installMaestro
8586
with:

examples/bare-example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ android/config/
3838
ios/Settings.bundle/
3939
ios/license_plist.yml
4040
.rnef/
41+
.env
42+
.env.local
4143

4244
# node.js
4345
#

examples/bare-example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@types/jest": "^29.5.13",
3838
"@types/react": "^19.1.0",
3939
"@types/react-test-renderer": "^19.1.0",
40+
"dotenv": "^17.2.0",
4041
"jest": "^29.6.3",
4142
"react-test-renderer": "19.1.0"
4243
},
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// @ts-check
22
import { platformIOS } from '@rnef/platform-ios';
33
import { platformAndroid } from '@rnef/platform-android';
4+
import { providerGitHub } from '@rnef/provider-github';
45
import { pluginMetro } from '@rnef/plugin-metro';
6+
import 'dotenv/config';
57

68
/** @type {import('@rnef/cli').Config} */
79
export default {
@@ -10,5 +12,19 @@ export default {
1012
ios: platformIOS(),
1113
android: platformAndroid(),
1214
},
13-
remoteCacheProvider: 'github-actions',
15+
remoteCacheProvider: !hasGithubConfig()
16+
? null
17+
: providerGitHub({
18+
owner: process.env.GITHUB_REPOSITORY_OWNER,
19+
repository: process.env.GITHUB_REPOSITORY_NAME,
20+
token: process.env.GITHUB_TOKEN,
21+
}),
1422
};
23+
24+
function hasGithubConfig() {
25+
return (
26+
process.env.GITHUB_REPOSITORY_OWNER != null &&
27+
process.env.GITHUB_REPOSITORY_NAME != null &&
28+
process.env.GITHUB_TOKEN != null
29+
);
30+
}

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8506,6 +8506,13 @@ __metadata:
85068506
languageName: node
85078507
linkType: hard
85088508

8509+
"dotenv@npm:^17.2.0":
8510+
version: 17.2.0
8511+
resolution: "dotenv@npm:17.2.0"
8512+
checksum: 389d25dac7afeb1890bcd113c84d8d8175e95967559e90b8a6c8dc19bfc81ad3ede0036873c459cd8de1f90055a88232ddf74c550bcd2ea7a94b8d570f116470
8513+
languageName: node
8514+
linkType: hard
8515+
85098516
"dotenv@npm:^8.1.0":
85108517
version: 8.6.0
85118518
resolution: "dotenv@npm:8.6.0"
@@ -16166,6 +16173,7 @@ __metadata:
1616616173
"@types/jest": ^29.5.13
1616716174
"@types/react": ^19.1.0
1616816175
"@types/react-test-renderer": ^19.1.0
16176+
dotenv: ^17.2.0
1616916177
jest: ^29.6.3
1617016178
react: 19.1.0
1617116179
react-native: 0.80.1

0 commit comments

Comments
 (0)