Add yamllint CI and codespell CI
This commit is contained in:
6
.github/workflows/codeql_checks.yml
vendored
6
.github/workflows/codeql_checks.yml
vendored
@@ -18,9 +18,9 @@ jobs:
|
|||||||
name: Analyse
|
name: Analyse
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
sdk: [ "$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK" ]
|
sdk: ["$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK"]
|
||||||
#'cpp' covers C and C++
|
# 'cpp' covers C and C++
|
||||||
language: [ 'cpp' ]
|
language: ['cpp']
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest
|
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest
|
||||||
|
|||||||
23
.github/workflows/codespell.yml
vendored
Normal file
23
.github/workflows/codespell.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Misspelings CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
- develop
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
misspell:
|
||||||
|
name: Check misspellings
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Check misspellings
|
||||||
|
uses: codespell-project/actions-codespell@v2
|
||||||
|
with:
|
||||||
|
builtin: clear,rare
|
||||||
|
check_filenames: true
|
||||||
|
path: src, src_bagl, src_common, src_features, src_nbgl, src_plugin_sdk, src_plugins, doc, client
|
||||||
7
.github/workflows/lint-workflow.yml
vendored
7
.github/workflows/lint-workflow.yml
vendored
@@ -24,3 +24,10 @@ jobs:
|
|||||||
source: './'
|
source: './'
|
||||||
extensions: 'h,c'
|
extensions: 'h,c'
|
||||||
version: 12
|
version: 12
|
||||||
|
|
||||||
|
yamllint:
|
||||||
|
name: Check yaml files
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: yamllint .
|
||||||
|
|||||||
62
.github/workflows/python-client.yml
vendored
62
.github/workflows/python-client.yml
vendored
@@ -44,37 +44,37 @@ jobs:
|
|||||||
needs: [lint, mypy]
|
needs: [lint, mypy]
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Build Python package
|
- name: Build Python package
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip build twine
|
pip install --upgrade pip build twine
|
||||||
cd client/
|
cd client/
|
||||||
python -m build;
|
python -m build;
|
||||||
python -m twine check dist/*
|
python -m twine check dist/*
|
||||||
pip install .;
|
pip install .;
|
||||||
echo "TAG_VERSION=$(python -c 'from ledger_app_clients.ethereum import __version__; print(__version__)')" >> "$GITHUB_ENV"
|
echo "TAG_VERSION=$(python -c 'from ledger_app_clients.ethereum import __version__; print(__version__)')" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Check version against CHANGELOG
|
- name: Check version against CHANGELOG
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
CHANGELOG_VERSION=$(grep -Po '(?<=## \[)(\d+\.)+[^\]]' client/CHANGELOG.md | head -n 1)
|
CHANGELOG_VERSION=$(grep -Po '(?<=## \[)(\d+\.)+[^\]]' client/CHANGELOG.md | head -n 1)
|
||||||
if [ "${{ env.TAG_VERSION }}" == "${CHANGELOG_VERSION}" ];
|
if [ "${{ env.TAG_VERSION }}" == "${CHANGELOG_VERSION}" ];
|
||||||
then
|
then
|
||||||
echo 'Package and CHANGELOG versions match!';
|
echo 'Package and CHANGELOG versions match!';
|
||||||
exit 0;
|
exit 0;
|
||||||
else
|
else
|
||||||
echo "Tag '${{ env.TAG_VERSION }}' and CHANGELOG '${CHANGELOG_VERSION}' versions mismatch!";
|
echo "Tag '${{ env.TAG_VERSION }}' and CHANGELOG '${CHANGELOG_VERSION}' versions mismatch!";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Publish Python package on pypi.org
|
- name: Publish Python package on pypi.org
|
||||||
if: success() && github.event_name == 'push'
|
if: success() && github.event_name == 'push'
|
||||||
run: (cd client && python -m twine upload --verbose dist/*)
|
run: (cd client && python -m twine upload --verbose dist/*)
|
||||||
env:
|
env:
|
||||||
TWINE_USERNAME: __token__
|
TWINE_USERNAME: __token__
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}
|
||||||
TWINE_NON_INTERACTIVE: 1
|
TWINE_NON_INTERACTIVE: 1
|
||||||
|
|||||||
7
.yamllint.yml
Normal file
7
.yamllint.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
document-start: disable
|
||||||
|
line-length: disable
|
||||||
|
truthy: disable
|
||||||
Reference in New Issue
Block a user