-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from LedgerHQ/cev/improvments
Few extension improvments and fix
Showing
20 changed files
with
5,386 additions
and
408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Build, Lint and run functional tests | ||
|
||
# This workflow will Lint, Build and then Run tests. | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
Build: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Install dependencies | ||
run: sudo apt update && sudo apt install -qy eslint | ||
if: runner.os == 'Linux' | ||
|
||
- name: Clone | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: node | ||
|
||
- name: Packages installation | ||
run: npm install | ||
|
||
- name: Compile | ||
run: npm run compile | ||
|
||
- name: Linter | ||
if: runner.os == 'Linux' | ||
run: npm run lint | ||
|
||
- name: Test | ||
if: runner.os == 'Linux' | ||
run: xvfb-run -a npm test | ||
|
||
- name: Test | ||
if: runner.os != 'Linux' | ||
run: npm test | ||
|
||
Build_Windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: node | ||
|
||
- name: Packages installation | ||
run: cmd.exe /c npm.cmd install | ||
|
||
- name: Compile | ||
run: cmd.exe /c npm.cmd run compile | ||
|
||
- name: Test | ||
run: cmd.exe /c npm.cmd test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Misspellings checks | ||
|
||
# This workflow performs some misspelling checks on the repository | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
misspell: | ||
name: Check misspellings | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check misspellings | ||
uses: codespell-project/actions-codespell@v2 | ||
with: | ||
builtin: clear,rare | ||
check_filenames: true | ||
skip: package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Publish Extension | ||
|
||
# This workflow publish the extension when a new tag is pushed | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
check_tag: | ||
name: Check triggering tag | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
|
||
- name: Verify the tag | ||
run: | | ||
git fetch -aptf | ||
git tag -v ${{ github.ref_name }} | ||
check_changelog: | ||
name: Check changelog versions | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get CHANGELOG version | ||
run: | | ||
echo "CHANGELOG_VERSION=$(grep -Po '(?<=## \[)(\d\.)+[^\]]' CHANGELOG.md | head -n 1)" >> "$GITHUB_ENV" | ||
- name: Check tag version against CHANGELOG version | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
if [ "${{ github.ref_name }}" != "${CHANGELOG_VERSION}" ]; then | ||
echo "Tag '${{ github.ref_name }}' and CHANGELOG '${CHANGELOG_VERSION}' versions mismatch!" | ||
exit 1 | ||
fi | ||
publish: | ||
name: Publish the extension | ||
runs-on: ubuntu-latest | ||
needs: [check_tag, check_changelog] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: node | ||
|
||
- name: Packages installation | ||
run: npm install @vscode/vsce --save-dev | ||
|
||
- name: Publish to Visual Studio Marketplace | ||
run: npm deploy | ||
env: | ||
pat: ${{ secrets.VSCE_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
node_modules/ | ||
dist/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Style file for mdl | ||
# https://github.com/markdownlint/markdownlint/blob/main/docs/creating_styles.md | ||
|
||
# Include all rules | ||
all | ||
|
||
# Disable specific rules | ||
#exclude_rule 'MD012' | ||
|
||
# Update rules configuration | ||
rule 'MD013', :line_length => 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# markdownlint config file | ||
|
||
# Use custom style file | ||
style "#{File.dirname(__FILE__)}/.mdl.rb" | ||
|
||
# MD002 - First header in file should be a top level header | ||
# MD005 - Inconsistent indentation for list items at the same level | ||
# MD007 - Unordered list indentation | ||
# MD014 - Dollar signs used before commands without showing output | ||
# MD024 - Multiple headers with the same content | ||
# MD029 - Ordered list item prefix | ||
# MD033 - Inline HTML | ||
# MD041 - First line in file should be a top level header | ||
# MD046 - Code block style | ||
rules "~MD002,~MD005,~MD007,~MD014,~MD024,~MD029,~MD033,~MD041,~MD046" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# To install hooks, run: | ||
# pre-commit install --hook-type pre-commit | ||
# pre-commit install --hook-type commit-msg | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- id: check-case-conflict | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
# args: ['--ignore-words-list', 'ontop,shft,hte', '--skip', 'makefile_conf/chain/*,tests/ragger/eip712_input_files/*'] | ||
args: ['--skip', 'package-lock.json'] | ||
|
||
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py | ||
rev: v1.6.27.13 | ||
hooks: | ||
- id: actionlint | ||
types_or: [yaml] | ||
args: [-shellcheck='' -pyflakes=''] | ||
|
||
- repo: https://github.com/markdownlint/markdownlint | ||
rev: v0.12.0 | ||
hooks: | ||
- id: markdownlint | ||
types_or: [markdown] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v9.2.0 | ||
hooks: | ||
- id: eslint | ||
types_or: [javascript, jsx, ts, tsx] | ||
args: ['--config=./.eslintrc.json'] | ||
additional_dependencies: [ | ||
'eslint@8.41.0' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.