Skip to content
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

Feature/336 veramo upgrade 2 #1055

Merged
merged 58 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
fe5a00d
build:
theblockstalk Jul 21, 2024
5dd8520
build: fixed the bundler errors with new SDK
theblockstalk Jul 22, 2024
99ce7b9
ci: updated node version
theblockstalk Jul 22, 2024
b091070
refactor: removed unnecessary runtime check
theblockstalk Jul 22, 2024
0de3824
build: updated node version for eas build and did a pkg test in CI
theblockstalk Jul 22, 2024
2b66373
feat: upgrade for non RN packages working
theblockstalk Jul 22, 2024
dda0338
ci: package upgrade instructions
theblockstalk Jul 22, 2024
8609815
fix: reverted to previous eslint
theblockstalk Jul 23, 2024
8ba24f4
test: fixed jest config
theblockstalk Jul 25, 2024
e7af7c7
test: removed unused test dependancies
theblockstalk Jul 25, 2024
4c84613
style: fixed zustad import interface
theblockstalk Jul 25, 2024
94db6a2
style: fixed zustad interface
theblockstalk Jul 25, 2024
00afc76
feat: latest test SDK
theblockstalk Jul 25, 2024
a4d6912
feat: updated polyfills
theblockstalk Jul 25, 2024
1be7e53
test: Added veramo tests
theblockstalk Jul 30, 2024
8d61679
feat: latest SDK
theblockstalk Jul 30, 2024
b14ec84
feat: Debug used for debugging
theblockstalk Jul 30, 2024
cf0e7e1
docs: using debug env variable in eas.json
theblockstalk Jul 30, 2024
9246d51
feat: Fixed did method filter
theblockstalk Jul 30, 2024
b83ebd6
feat: SDK update
theblockstalk Jul 31, 2024
3b2c5ed
feat: upgraded to latest stable yarn 4.3.1
theblockstalk Aug 1, 2024
d99aec1
feat: Updated to latest sdk using latest yarn
theblockstalk Aug 1, 2024
c60b867
ci: Added build-apk.yaml github action
theblockstalk Aug 2, 2024
b26870e
ci: Test on all push, and branch protection
theblockstalk Aug 2, 2024
a6ad53e
test: fixed jest config and added DEBUG to env
theblockstalk Aug 2, 2024
7118aee
ci: build apk
theblockstalk Aug 2, 2024
6a60b32
ci: try remove disk space
theblockstalk Aug 2, 2024
c78bb2e
ci: different ubuntu
theblockstalk Aug 2, 2024
71aa94a
ci: test versions
theblockstalk Aug 2, 2024
18735cb
ci: fixed different jobs
theblockstalk Aug 2, 2024
5a8ce39
ci: fixed check-sdk
theblockstalk Aug 2, 2024
d417011
ci: check sdk branches
theblockstalk Aug 2, 2024
dbc5583
ci: master branch
theblockstalk Aug 2, 2024
f97c2a4
ci: expo doctor
theblockstalk Aug 2, 2024
c26473c
ci: expo doctor
theblockstalk Aug 2, 2024
b1ebc94
ci: reverted to old
theblockstalk Aug 2, 2024
b24887c
ci: fixed corepack
theblockstalk Aug 2, 2024
1b28402
Merge remote-tracking branch 'origin/development' into feature/336-ve…
theblockstalk Aug 2, 2024
4589d00
ci: apk build
theblockstalk Aug 2, 2024
30e18d3
feat:
theblockstalk Aug 2, 2024
d81fc0e
ci: expo doctor
theblockstalk Aug 4, 2024
c75f2df
ci: delete unused space
theblockstalk Aug 4, 2024
d4bb375
ci: sudo for docker commands
theblockstalk Aug 4, 2024
a1de636
ci: removed yarn and npm clean steps
theblockstalk Aug 4, 2024
fe78880
ci: fixed delete folders
theblockstalk Aug 4, 2024
0158b58
ci: better docker images output
theblockstalk Aug 4, 2024
29dae50
ci: final build APK working
theblockstalk Aug 4, 2024
64ee9b7
chore: remove LOG usage and unnecessary metro config
theblockstalk Aug 4, 2024
3d05ccc
ci: better build apk notes and conditional step
theblockstalk Aug 5, 2024
fff04cf
test: fixed local build system
theblockstalk Aug 5, 2024
c997460
chore: fixed typescript errors for yarn link
theblockstalk Aug 5, 2024
8ad555d
style: turn of ts comment lint errors
theblockstalk Aug 5, 2024
dd186a5
Merge branch 'development' of github.com:Tonomy-Foundation/Tonomy-ID …
theblockstalk Aug 9, 2024
d073997
Merge branch 'development' of github.com:Tonomy-Foundation/Tonomy-ID …
theblockstalk Aug 14, 2024
a5ade5c
fix: fix transactionRequest screen props type
theblockstalk Aug 14, 2024
6a8155c
comment testveramo test
sadiabbasi Aug 18, 2024
a491bd8
build: Upgrade to to latest SDK
theblockstalk Aug 19, 2024
d14e0e9
ci: update node version
theblockstalk Aug 19, 2024
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
75 changes: 66 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,81 @@
"rules": {
"eqeqeq": "error",
"no-console": "warn",
"indent": ["error", 4, { "SwitchCase": 1 }],
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"camelcase": "error",
"prettier/prettier": "error",
"@typescript-eslint/ban-ts-comment": "warn",
"react/display-name": "off",
"react/no-children-prop": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"padding-line-between-statements": [
"warn",
{ "blankLine": "always", "prev": "block-like", "next": "*" },
{ "blankLine": "always", "prev": "block", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": ["block","block-like"] },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]},
{ "blankLine": "always", "prev": ["export", "import"], "next": "*"},
{ "blankLine": "any", "prev": "import", "next": "import"},
{ "blankLine": "any", "prev": "export", "next": "export"}
{
"blankLine": "always",
"prev": "block-like",
"next": "*"
},
{
"blankLine": "always",
"prev": "block",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": [
"block",
"block-like"
]
},
{
"blankLine": "always",
"prev": [
"const",
"let",
"var"
],
"next": "*"
},
{
"blankLine": "any",
"prev": [
"const",
"let",
"var"
],
"next": [
"const",
"let",
"var"
]
},
{
"blankLine": "always",
"prev": [
"export",
"import"
],
"next": "*"
},
{
"blankLine": "any",
"prev": "import",
"next": "import"
},
{
"blankLine": "any",
"prev": "export",
"next": "export"
}
]
},
"parserOptions": {
Expand Down
38 changes: 0 additions & 38 deletions .github/build-apk.yaml

This file was deleted.

85 changes: 85 additions & 0 deletions .github/workflows/build-apk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Build Android APK

# Use https://github.com/nektos/act to run this locally
# INSTALL:
# curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
# PREPARE: you need to have a `testnet` project in EAS:
# export EXPO_NODE_ENV=testnet
# export EXPO_FIRST_TIME=true
# yarn run build:android
# echo "Set the value of `expoProjectId` in src/config/config.testnet.json"
# RUN:
# act -j build-android -s EXPO_TOKEN="${EXPO_TOKEN}"

on:
push

jobs:
build-android:
runs-on: ubuntu-latest
env:
EXPO_NODE_ENV: testnet
EXPO_PLATFORM: android
NODE_VERSION: 22.3.0
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
# https://expo.dev/accounts/[account]/settings/access-tokens
container:
image: cimg/android:2024.01-ndk
# See https://circleci.com/developer/images/image/cimg/android#image-tags

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install nodejs
run: |
wget "nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz"
sudo tar -C /usr/local --strip-components 1 -xzf "node-v${NODE_VERSION}-linux-x64.tar.gz"
sudo corepack enable
node -v && npm -v && yarn -v
rm "node-v${NODE_VERSION}-linux-x64.tar.gz"

# Clears about 3.2Gb
# Images:
# - node:16/18/20(-alpine)
# - moby/buildkit:latest
# - alpine:3.16/3.17/3.18/3.19
# - debian:10/11
# - ubuntu:20.04/22.04
- name: Clean up Docker images
run: |
echo "Docker before cleanup:"
sudo docker ps
sudo docker images
sudo docker system df
sudo docker system prune -af
echo "Docker after cleanup:"
sudo docker ps
sudo docker images
sudo docker system df

- name: Install dependancies
run: yarn --immutable

# Clears about 0.5Gb
- name: Clear yarn cache
run: |
sudo du -sh ~/.yarn
yarn cache clean
sudo du -sh ~/.yarn

- name: 🚀 Build Android .apk app
run: |
yarn run build:prepare
npx eas build --clear-cache --profile testnet-internal --platform "${EXPO_PLATFORM}" --local

- name: Find APK file and rename it so it can be added as an artifact
run: find . -name "*.apk" -exec mv {} TonomyID.apk \;

- name: Archive Android APK as artifact
# Do not run this step if the action is being run locally (using nektos/act)
if: ${{ github.actor != 'nektos/act' }}
uses: actions/upload-artifact@v3
with:
name: TonomyID-Android
path: ./TonomyID.apk
8 changes: 5 additions & 3 deletions .github/workflows/check-sdk-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ jobs:
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 📦 Check it is using the latest version of the SDK
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: yarn install --immutable
- run: yarn run updateSdkVersion $GITHUB_BASE_REF check
- run: yarn run updateSdkVersion $GITHUB_BASE_REF check
6 changes: 4 additions & 2 deletions .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ jobs:
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 🚀 Build and publish demo app
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: echo "${GOOGLE_SERVICE_ACCOUNT_KEY}" > ./google-service-key.json
- run: echo "${APPLE_STORE_CONNECT_API_KEY}" > ./apple-asc-api-key.p8
- run: yarn --immutable
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ jobs:
with:
token: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}}
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic

# TODO replace this with using semantic-release to do git bump
- name: "Automated Version Bump"
uses: "phips28/gh-action-bump-version@master"
env:
GITHUB_TOKEN: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}}
with:
commit-message: "ci: bumps version to {{version}} [skip ci]"

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 🚀 Build and publish staging app
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: echo "${GOOGLE_SERVICE_ACCOUNT_KEY}" > ./google-service-key.json
- run: echo "${APPLE_STORE_CONNECT_API_KEY}" > ./apple-asc-api-key.p8
- run: yarn --immutable
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/deploy-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ jobs:
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 🚀 Build and publish testnet app
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: echo "${GOOGLE_SERVICE_ACCOUNT_KEY}" > ./google-service-key.json
- run: echo "${APPLE_STORE_CONNECT_API_KEY}" > ./apple-asc-api-key.p8
- run: yarn --immutable
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Test - Pull Requests (not to master)
name: Tests

on:
pull_request:
branches-ignore:
- master
on: push

jobs:
build:
Expand All @@ -13,12 +10,14 @@ jobs:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 📦 Build, test and lint
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: yarn --immutable
- run: yarn run test
- run: yarn run lint
- run: yarn run typeCheck
- run: yarn run typeCheck
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.eslint": "explicit"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VS code did this automatically. So I assume so

},
"jest.autoRun": {
"onSave": false
Expand All @@ -16,4 +16,10 @@
"jest.testExplorer": {
"enabled": true
},
"git.branchPrefix": "feature/",
"git.branchProtection": [
"master",
"main",
"development"
],
}
768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.1.cjs

This file was deleted.

4 changes: 1 addition & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.1.1.cjs
nodeLinker: node-modules
8 changes: 7 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// IMPORTANT: The following 3 packages should be imported in this order:
import 'reflect-metadata';
import '@walletconnect/react-native-compat';
import './src/utils/logs';
import './src/utils/polyfill';
// NOTE: The rest can be imported in any order
import '@walletconnect/react-native-compat';
import React from 'react';
import { Provider as PaperProvider } from 'react-native-paper';
import RootNavigation from './src/navigation/Root';
Expand All @@ -12,6 +15,9 @@ import ErrorHandlerContainer from './src/components/ErrorHandlerProvider';
import useErrorStore from './src/store/errorStore';
import settings from './src/settings';
import { runTests } from './src/utils/runtime-tests';
import Debug from 'debug';

Debug.enable(process.env.DEBUG);

if (!settings.isProduction()) {
runTests();
Expand Down
Loading
Loading