Skip to content

Commit

Permalink
Merge branch 'trustwallet:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ElemontCapital committed Mar 3, 2024
2 parents 1636dbc + c175ca7 commit 613d355
Show file tree
Hide file tree
Showing 2,799 changed files with 34,493 additions and 3,438 deletions.
4 changes: 3 additions & 1 deletion .github/assets.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ client_urls:
binance:
dex: "https://dex.binance.org"
explorer: "https://explorer.binance.org"
assets_manager_api: "https://api.assets.trustwallet.com"
assets_manager_api: "https://assets.trustwallet.com/api"

urls:
assets_app: "https://assets-cdn.trustwallet.com"
Expand Down Expand Up @@ -43,6 +43,8 @@ validators_settings:
- "bin"
skip_files:
- "node_modules"
skip_dirs:
- ".git"

chain_folder:
allowed_files:
Expand Down
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
29 changes: 17 additions & 12 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
name: Check

on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18
id: go

- name: Check out code
uses: actions/checkout@v2

- name: Run check
run: make check

- name: Unit Test
run: make test
uses: actions/checkout@v3

- name: Lint
run: make lint
# - name: Run check
# run: make check
#
# - name: Unit Test
# run: make test
#
# - name: Lint
# run: make lint
63 changes: 63 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '43 20 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: Build assets binary
run: make build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
54 changes: 26 additions & 28 deletions .github/workflows/fix-dryrun.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
name: Fix (Dry run)
on:
pull_request:
branches: master
#Disabled, we have 'check' job, 'fix' job do invisible changes which is not convenient to debug

jobs:
fix-dryrun:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
id: go

- name: Check out code
uses: actions/checkout@v2

- name: Run fix
run: make fix

- name: Show fix result (diff)
run: |
git config core.ignorecase false
git status
git diff
- name: Run check
run: make check
#name: Fix (Dry run)
#on:
# pull_request:
# branches: [ master ]
#
#jobs:
# fix-dryrun:
# runs-on: ubuntu-latest
# steps:
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: 1.18
#
# - name: Check out code
# uses: actions/checkout@v3
#
# - name: Run fix
# run: make fix
#
# - name: Show fix result (diff)
# run: |
# git config core.ignorecase false
# git status
# git diff
100 changes: 47 additions & 53 deletions .github/workflows/fix.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,48 @@
name: Fixes
# Runs on:
# - on master branch of trustwallet repo: fix, checkin
# - on other branch of trustwallet repo: fix, checkin
# - on fork repos: fix-sanity only
on:
push:
branches:
- 'master'
- '*'
workflow_dispatch:
jobs:
fix-all:
runs-on: ubuntu-latest
steps:
- name: Checkout (trustwallet repo, secret token)
if: github.repository_owner == 'trustwallet'
uses: actions/checkout@v2
with:
token: ${{ secrets.COMMIT_TOKEN }}
ref: ${{ github.ref }}
#Disabled, we have 'check' job, 'fix' job do invisible changes which is not convenient to debug

- name: Checkout (fork repo, default token)
if: github.repository_owner != 'trustwallet'
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.ref }}

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
id: go

- name: Run fix
if: github.repository_owner == 'trustwallet'
run: make fix

- name: Show fix result (diff)
run: |
git status
git diff
- name: Run check
run: make check

- name: Commit changes
if: success()
uses: stefanzweifel/[email protected]
with:
commit_user_name: trust-wallet-merge-bot
commit_user_email: [email protected]
commit_message: Fixes (sanity and consistency, auto)
#name: Fix All
#
#on:
# push:
# branches:
# - '*'
# workflow_dispatch:
#
#jobs:
# fix-all:
# runs-on: ubuntu-latest
#
# if: github.repository_owner == 'trustwallet' && github.event.repository.fork == false
#
# steps:
# - name: Checkout (trustwallet repo, secret token)
# uses: actions/checkout@v3
# with:
# # Use trust-ci fine-grained PAT to checkout and later commit the code
# # Do not use for forked repos
# token: ${{ secrets.CI_GITHUB_TOKEN }}
# ref: ${{ github.ref }}
#
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: 1.18
#
# - name: Run fix
# run: make fix
#
# - name: Show fix result (diff)
# run: |
# git status
# git diff
#
# - name: Run check
# run: make check
#
# - name: Commit changes
# if: success()
# uses: stefanzweifel/[email protected]
# with:
# commit_user_name: trust-ci
# commit_user_email: "[email protected]"
# commit_message: Auto fix all (sanity and consistency)
16 changes: 8 additions & 8 deletions .github/workflows/periodic-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
periodic-auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.COMMIT_TOKEN }}
ref: ${{ github.head_ref }}
token: ${{ secrets.CI_GITHUB_TOKEN }}
ref: ${{ github.head_ref }}

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18
id: go
Expand All @@ -33,8 +33,8 @@ jobs:

- name: Commit changes
if: success()
uses: stefanzweifel/git-auto-commit-action@v4.1.2
uses: stefanzweifel/git-auto-commit-action@v4.16.0
with:
commit_user_name: trust-wallet-merge-bot
commit_user_email: [email protected]
commit_message: External Updates
commit_message: External Updates
commit_user_name: trust-ci
commit_user_email: "[email protected]"
30 changes: 0 additions & 30 deletions .github/workflows/pr-ci.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Confiugre AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_REGION }}

- name: Deploy to S3
- name: Sync to S3
if: github.repository_owner == 'trustwallet'
shell: bash
run: aws s3 sync . s3://$AWS_S3_BUCKET --follow-symlinks --delete --exclude '*' --include 'dapps/*' --include 'blockchains/*' --size-only
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
**/.DS_Store
node_modules/
.idea
.vscode/
*~
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ linters:
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
Expand Down
Loading

0 comments on commit 613d355

Please sign in to comment.