Skip to content

Commit

Permalink
Merge pull request #1611 from Emurgo/release/4.4
Browse files Browse the repository at this point in the history
Release / 4.4
  • Loading branch information
vsubhuman committed Sep 26, 2021
2 parents 45c235a + e5f6f98 commit 70816ce
Show file tree
Hide file tree
Showing 468 changed files with 11,571 additions and 15,970 deletions.
38 changes: 9 additions & 29 deletions .circleci/config.yml
Expand Up @@ -3,7 +3,7 @@ version: 2
rn_defaults: &rn_defaults
working_directory: ~/project
docker:
- image: circleci/node:10.14.2
- image: cimg/node:16.5.0

jobs:
install-dependencies:
Expand All @@ -19,15 +19,10 @@ jobs:
# install rustup
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- run: echo 'export PATH=$HOME/.cargo/bin/:$PATH' >> $BASH_ENV
# use 1.32.0 version.
- run: rustup install 1.32.0
# use 1.41.0 version.
- run: rustup install 1.41.0
- run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
- run: cargo install cargo-lipo

- run:
name: Match bitrise's yarn version
command: sudo npm install -g yarn@${BITRISE_YARN_VER}

- run:
name: Install Dependencies
command: yarn install --network-concurrency 1
Expand All @@ -37,43 +32,33 @@ jobs:
- node_modules
- yarn.lock


- persist_to_workspace:
root: .
paths: .
paths:
- .

flow:
<<: *rn_defaults
steps:
- attach_workspace:
at: ~/project
- run:
name: Match bitrise's yarn version
command: sudo npm install -g yarn@${BITRISE_YARN_VER}
- run: yarn flow

test:
<<: *rn_defaults
steps:
- attach_workspace:
at: ~/project
- run:
name: Match bitrise's yarn version
command: sudo npm install -g yarn@${BITRISE_YARN_VER}
- run: yarn test
- run: yarn test --runInBand

lint:
<<: *rn_defaults
steps:
- attach_workspace:
at: ~/project

- run:
name: Match bitrise's yarn version
command: sudo npm install -g yarn@${BITRISE_YARN_VER}
# Because npm link will write in this path
- run: sudo chown -R "$(whoami):$(whoami)" /usr/local/lib/node_modules
- run: npm link rust-cardano-crypto
- run: yarn lint

android:
Expand All @@ -89,8 +74,8 @@ jobs:
# install rustup
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- run: echo 'export PATH=$HOME/.cargo/bin/:$PATH' >> $BASH_ENV
# use 1.32.0 version.
- run: rustup install 1.32.0
# use 1.41.0 version.
- run: rustup install 1.41.0
- run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
- run: cargo install cargo-lipo
- run: export
Expand Down Expand Up @@ -121,9 +106,4 @@ workflows:
- install-dependencies
- test:
requires:
- install-dependencies
# - android:
# requires:
# - install-dependencies
# - lint
# - flow
- install-dependencies
25 changes: 12 additions & 13 deletions .eslintrc.js
@@ -1,6 +1,14 @@
// @flow

module.exports = {
extends: ['vacuumlabs', 'plugin:react-hooks/recommended'],
plugins: ['react-native', 'flowtype'],
extends: [
'vacuumlabs',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:flowtype/recommended',
'prettier',
],
plugins: ['react', 'react-native', 'flowtype'],
env: {
'react-native/react-native': true,
},
Expand All @@ -14,18 +22,10 @@ module.exports = {
rules: {
'array-callback-return': 2,
'lines-between-class-members': [1, 'always', {exceptAfterSingleLine: true}],
'max-len': [
1,
{
code: 100,
tabWidth: 2,
ignoreStrings: false,
ignoreTemplateLiterals: false,
},
],
'spaced-comment': 1,
'react/no-access-state-in-setstate': 2,
'react/no-multi-comp': 0,
'react/display-name': 0,
'no-multi-str': 0,
'no-lone-blocks': 0,
'react/no-typos': 2,
Expand All @@ -43,8 +43,7 @@ module.exports = {
},
],
'flowtype/require-valid-file-annotation': [2, 'always'],
'flowtype/define-flow-type': 1,
'flowtype/use-flow-type': 1,
'flowtype/newline-after-flow-annotation': [2, 'always'],
},
globals: {
Buffer: false,
Expand Down
10 changes: 2 additions & 8 deletions .flowconfig
Expand Up @@ -2,16 +2,14 @@
; We fork some components by platform
.*/*[.]android.js

exact_by_default=true

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

Expand Down Expand Up @@ -72,10 +70,6 @@ suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

server.max_workers=1

[lints]
Expand Down
5 changes: 2 additions & 3 deletions .gitattributes
@@ -1,4 +1,3 @@
*.pbxproj -text

# specific for windows script files
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
76 changes: 76 additions & 0 deletions .github/workflows/pr-checks.yml
@@ -0,0 +1,76 @@
name: PR Checks

on:
pull_request_review:
types: [submitted]

jobs:
flow:
if: github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.5.0'
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install
run: |
yarn install
- name: run flow
run: |
yarn flow
lint:
if: github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.5.0'
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install
run: |
yarn install
- name: run lint
run: |
yarn lint
test:
if: github.event.review && (github.event.review.state == 'approved' || contains(github.event.review.body, '/check'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.5.0'
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install
run: |
yarn install
- name: run test
run: |
yarn test
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -98,4 +98,5 @@ app-mainnet-release.apk
output.json
java_pid*

flow-coverage
flow-coverage
.eslintcache
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
v10.14.2
v16.5.0
2 changes: 2 additions & 0 deletions .prettierignore
@@ -0,0 +1,2 @@
translations
src/i18n
2 changes: 1 addition & 1 deletion .prettierrc
@@ -1,5 +1,5 @@
{
"printWidth": 80,
"printWidth": 120,
"trailingComma": "all",
"tabWidth": 2,
"semi": false,
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
@@ -1,4 +1,4 @@
nodejs 10.14.2
nodejs 16.5.0
rust 1.41.0
java adoptopenjdk-8.0.292+10
python 2.7.18

0 comments on commit 70816ce

Please sign in to comment.