Skip to content

Update library tools & example #124

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
merged 15 commits into from
Nov 7, 2023
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
70 changes: 0 additions & 70 deletions .circleci/config.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
root: true,
extends: ['@react-native', 'plugin:prettier/recommended'],
ignorePatterns: ['node_modules/', 'lib/'],
};
71 changes: 0 additions & 71 deletions .flowconfig

This file was deleted.

4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pbxproj -text
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
38 changes: 37 additions & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ inputs:
node-version:
description: 'The Node.js version to set up'
required: false

lookup-only:
description: 'If true, only checks if cache entry exists and skips download. Default: false'
required: false
default: false

runs:
using: 'composite'
Expand All @@ -13,13 +16,46 @@ runs:
with:
node-version: ${{ inputs.node-version }}


- name: Restore example node_modules from cache
uses: actions/cache/restore@v3
id: restore_example_node_modules
with:
key: ${{ runner.os }}-yarn-example-${{ hashFiles('./example/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-example-
path: ${{ github.workspace }}/example/node_modules
lookup-only: ${{ inputs.lookup-only }}


- name: Install example node_modules
if: steps.restore_example_node_modules.outputs.cache-hit != 'true'
shell: bash
working-directory: example
run: |
# Retry 3 times before the steps actually fails
(echo "===== Install node_modules Attempt: 1 ====" && yarn install --frozen-lockfile) || \
(echo "===== Install node_modules Attempt: 2 ====" && yarn install --frozen-lockfile) || \
(echo "===== Install node_modules Attempt: 3 ====" && yarn install --frozen-lockfile) || \
(echo "===== Install node_modules Step Failed ====" && exit 1)


- name: Save example node_modules to cache
if: steps.restore_example_node_modules.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
key: ${{ steps.restore_example_node_modules.outputs.cache-primary-key }}
path: ${{ github.workspace }}/example/node_modules



- name: Restore node_modules from cache
uses: actions/cache/restore@v3
id: restore_node_modules
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
path: ${{ github.workspace }}/node_modules
lookup-only: ${{ inputs.lookup-only }}


- name: Install node_modules
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
with:
fetch-depth: 0
- uses: ./.github/actions/install-dependencies
with:
lookup-only: true

code-quality:
name: Code Quality
Expand All @@ -38,10 +40,13 @@ jobs:
- uses: ./.github/actions/install-dependencies

- name: Lint files
run: yarn run test:eslint
run: yarn lint

- name: Types check
run: yarn ts

- name: Flow files
run: yarn run test:flow
- name: Lib build
run: yarn build

build-android:
name: Build Android
Expand Down
59 changes: 44 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@

# OSX
#
.DS_Store

# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# XDE
.expo/

# VSCode
.vscode/
jsconfig.json

# Xcode
#
Expand All @@ -29,21 +28,51 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace


# Android/IntelliJ
# Android/IJ
#
build/
.idea
.gradle
local.properties
*.iml
android.iml

# Cocoapods
#
example/ios/Pods

# node.js
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
android/app/libs
android/keystores/debug.keystore

# Expo
.expo/*

# generated by bob
lib/

#e2e
test-butler-app.apk
example/vendor

#Example
example/ios/Pods
example/vendor
.lefthookrc
lefthook.yml


# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# bundle
.tmp/
# testing
/coverage
.cxx
Loading