Skip to content

Commit a4cfdec

Browse files
Merge pull request #12 from FinTecSystems/develop
Version 2.0.0
2 parents 6d3e582 + 8054b2b commit a4cfdec

96 files changed

Lines changed: 17661 additions & 26584 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 🐛 Bug report
2+
description: Report a reproducible bug or regression in this library.
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Bug report
9+
10+
👋 Hi!
11+
12+
**Please fill the following carefully before opening a new issue ❗**
13+
*(Your issue may be closed if it doesn't provide the required pieces of information)*
14+
- type: checkboxes
15+
attributes:
16+
label: Before submitting a new issue
17+
description: Please perform simple checks first.
18+
options:
19+
- label: I tested using the latest version of the library, as the bug might be already fixed.
20+
required: true
21+
- label: I tested using a [supported version](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md) of react native.
22+
required: true
23+
- label: I checked for possible duplicate issues, with possible answers.
24+
required: true
25+
- type: textarea
26+
id: summary
27+
attributes:
28+
label: Bug summary
29+
description: |
30+
Provide a clear and concise description of what the bug is.
31+
If needed, you can also provide other samples: error messages / stack traces, screenshots, gifs, etc.
32+
validations:
33+
required: true
34+
- type: input
35+
id: library-version
36+
attributes:
37+
label: Library version
38+
description: What version of the library are you using?
39+
placeholder: "x.x.x"
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: react-native-info
44+
attributes:
45+
label: Environment info
46+
description: Run `react-native info` in your terminal and paste the results here.
47+
render: shell
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: steps-to-reproduce
52+
attributes:
53+
label: Steps to reproduce
54+
description: |
55+
You must provide a clear list of steps and code to reproduce the problem.
56+
value: |
57+
1. …
58+
2. …
59+
validations:
60+
required: true
61+
- type: input
62+
id: reproducible-example
63+
attributes:
64+
label: Reproducible example repository
65+
description: Please provide a link to a repository on GitHub with a reproducible example.
66+
render: js
67+
validations:
68+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature Request 💡
4+
url: https://github.com/FinTecSystems/xs2a-react-native/discussions/new?category=ideas
5+
about: If you have a feature request, please create a new discussion on GitHub.
6+
- name: Discussions on GitHub 💬
7+
url: https://github.com/FinTecSystems/xs2a-react-native/discussions
8+
about: If this library works as promised but you need help, please ask questions there.

.github/actions/setup/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v4
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Restore dependencies
13+
id: yarn-cache
14+
uses: actions/cache/restore@v4
15+
with:
16+
path: |
17+
**/node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install dependencies
25+
if: steps.yarn-cache.outputs.cache-hit != 'true'
26+
run: yarn install --immutable
27+
shell: bash
28+
29+
- name: Cache dependencies
30+
if: steps.yarn-cache.outputs.cache-hit != 'true'
31+
uses: actions/cache/save@v4
32+
with:
33+
path: |
34+
**/node_modules
35+
.yarn/install-state.gz
36+
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}

.github/workflows/ci.yml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ "master", "develop" ]
5+
pull_request:
6+
branches: [ "master", "develop" ]
7+
merge_group:
8+
types:
9+
- checks_requested
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup
19+
uses: ./.github/actions/setup
20+
21+
- name: Lint files
22+
run: yarn lint
23+
24+
- name: Typecheck files
25+
run: yarn typecheck
26+
27+
test:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Setup
34+
uses: ./.github/actions/setup
35+
36+
- name: Run unit tests
37+
run: yarn test --maxWorkers=2 --coverage
38+
39+
build-library:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Setup
46+
uses: ./.github/actions/setup
47+
48+
- name: Build package
49+
run: yarn prepare
50+
51+
build-android:
52+
runs-on: ubuntu-latest
53+
env:
54+
TURBO_CACHE_DIR: .turbo/android
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v4
58+
59+
- name: Setup
60+
uses: ./.github/actions/setup
61+
62+
- name: Cache turborepo for Android
63+
uses: actions/cache@v4
64+
with:
65+
path: ${{ env.TURBO_CACHE_DIR }}
66+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
67+
restore-keys: |
68+
${{ runner.os }}-turborepo-android-
69+
70+
- name: Check turborepo cache for Android
71+
run: |
72+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
73+
74+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
75+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
76+
fi
77+
78+
- name: Install JDK
79+
if: env.turbo_cache_hit != 1
80+
uses: actions/setup-java@v4
81+
with:
82+
distribution: 'zulu'
83+
java-version: '17'
84+
85+
- name: Finalize Android SDK
86+
if: env.turbo_cache_hit != 1
87+
run: |
88+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
89+
90+
- name: Cache Gradle
91+
if: env.turbo_cache_hit != 1
92+
uses: actions/cache@v4
93+
with:
94+
path: |
95+
~/.gradle/wrapper
96+
~/.gradle/caches
97+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
98+
restore-keys: |
99+
${{ runner.os }}-gradle-
100+
101+
- name: Build example for Android
102+
env:
103+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
104+
run: |
105+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
106+
107+
build-ios:
108+
runs-on: macos-latest
109+
env:
110+
TURBO_CACHE_DIR: .turbo/ios
111+
steps:
112+
- name: Checkout
113+
uses: actions/checkout@v4
114+
115+
- name: Setup
116+
uses: ./.github/actions/setup
117+
118+
- name: Cache turborepo for iOS
119+
uses: actions/cache@v4
120+
with:
121+
path: ${{ env.TURBO_CACHE_DIR }}
122+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
123+
restore-keys: |
124+
${{ runner.os }}-turborepo-ios-
125+
126+
- name: Check turborepo cache for iOS
127+
run: |
128+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
129+
130+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
131+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
132+
fi
133+
134+
- name: Restore cocoapods
135+
if: env.turbo_cache_hit != 1
136+
id: cocoapods-cache
137+
uses: actions/cache/restore@v4
138+
with:
139+
path: |
140+
**/ios/Pods
141+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
142+
restore-keys: |
143+
${{ runner.os }}-cocoapods-
144+
145+
- name: Install cocoapods
146+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
147+
run: |
148+
cd example/ios
149+
pod install
150+
env:
151+
NO_FLIPPER: 1
152+
153+
- name: Cache cocoapods
154+
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
155+
uses: actions/cache/save@v4
156+
with:
157+
path: |
158+
**/ios/Pods
159+
key: ${{ steps.cocoapods-cache.outputs.cache-key }}
160+
161+
- name: Build example for iOS
162+
run: |
163+
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

0 commit comments

Comments
 (0)