mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-20 00:33:07 +01:00
feat: implement requirement that checks the AGENTS.md to verify it has all the skills linked fix: add it to CI demonstrate failure fix: AI adressing the comments fix: remove unnecessary parseArgs, use node native fix: bit of refactoring, introduce DI to test stuff fix: remove fix implmentation its too messy and I ddo not want to commit AI slop fix: di for report test with console feat: requirements uses nx-afected fix: refactor the requre affectd so it is not a slop fix: esm saddness fix: ignore pacakges fix: affected correcty test: intentionlly break it fix: CI for affected fix: revert, 'nrwl/nx-set-shas@v4' shall do the job fix: CI trial & error fix: ai slop to verify fix: comments stripping fix: try default fetch fix: strip fix: backfix the testing errors fix: missing components link fix: missing depcheck for analytics-docs fix: review fix: move tests fix: new ignored package local skill
204 lines
6.5 KiB
YAML
204 lines
6.5 KiB
YAML
name: "[Check] Validation"
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- release/2*
|
|
- release-native/*
|
|
|
|
env:
|
|
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_GHACTIONS_TOKEN }}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
setup-and-cache:
|
|
name: Setup and Cache Dependencies
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install node and yarn
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
- name: Yarn Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
|
|
restore-keys: |
|
|
yarn-cache-folder-
|
|
# We can skip the build for all dependencies, even for those whitelisted, because this process is used only to validate the yarn.lock file and populate the cache.
|
|
- name: Install deps
|
|
run: |
|
|
yarn --immutable --mode=skip-build
|
|
|
|
type-check:
|
|
name: Type Checking
|
|
needs: setup-and-cache
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=6144
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: "Checkout branches for Nx"
|
|
uses: ./.github/actions/nx-checkout
|
|
- name: "Minimal yarn install"
|
|
uses: ./.github/actions/minimal-yarn-install
|
|
- name: Type Check
|
|
# Temporarily disabling the cache (false positives because of cache mismatch after NX update)
|
|
run: yarn nx:type-check --output-style=stream --skip-nx-cache
|
|
|
|
lint:
|
|
name: Linting and formatting
|
|
needs: setup-and-cache
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: "Checkout branches for Nx"
|
|
uses: ./.github/actions/nx-checkout
|
|
- name: "Minimal yarn install"
|
|
uses: ./.github/actions/minimal-yarn-install
|
|
|
|
- name: ESlint Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
**/.eslintcache
|
|
!**/node_modules
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/.eslintrc.js') }}
|
|
- name: Lint JS
|
|
run: yarn lint:js --cache-strategy content
|
|
- name: Lint Styles
|
|
run: yarn nx:lint:styles --output-style=stream
|
|
- name: Check rust files changes
|
|
uses: dorny/paths-filter@v3
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
rust: packages/transport-bluetooth/**/*.rs
|
|
- name: Lint Rust
|
|
if: steps.changes.outputs.rust == 'true'
|
|
run: yarn workspace @trezor/transport-bluetooth lint:rs
|
|
|
|
test-madge-circular-imports:
|
|
name: Check for new Circular Imports
|
|
needs: setup-and-cache
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: "Checkout branches for Nx"
|
|
uses: ./.github/actions/nx-checkout
|
|
- name: "Minimal yarn install"
|
|
uses: ./.github/actions/minimal-yarn-install
|
|
- name: Check for new Circular Imports
|
|
run: ./scripts/circular-dependencies/check-circular-dependencies.sh
|
|
|
|
unit-tests-suite:
|
|
name: Unit Tests
|
|
needs: setup-and-cache
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
continue-on-error: true
|
|
strategy:
|
|
matrix:
|
|
test-task: [suite, native]
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: "Checkout branches for Nx"
|
|
uses: ./.github/actions/nx-checkout
|
|
- name: "Minimal yarn install"
|
|
uses: ./.github/actions/minimal-yarn-install
|
|
- name: Unit Tests
|
|
run: yarn nx:test-unit:${{ matrix.test-task }} --output-style=stream
|
|
|
|
build-libs-for-publishing:
|
|
name: "Build libs for publishing"
|
|
needs: setup-and-cache
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: "Checkout branches for Nx"
|
|
uses: ./.github/actions/nx-checkout
|
|
- name: "Minimal yarn install"
|
|
uses: ./.github/actions/minimal-yarn-install
|
|
- name: Build Libs
|
|
run: yarn nx:build:libs --output-style=stream
|
|
|
|
other-checks:
|
|
name: Other Checks
|
|
needs: setup-and-cache
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: "Checkout branches for Nx"
|
|
uses: ./.github/actions/nx-checkout
|
|
- name: "Minimal yarn install"
|
|
uses: ./.github/actions/minimal-yarn-install
|
|
- name: Verify Requirements
|
|
run: yarn requirements:verify
|
|
- name: Check Files for Correct Formatting
|
|
run: yarn nx format:check
|
|
- name: Verify TS Project References
|
|
run: yarn verify-project-references
|
|
- name: Detect unused dependencies
|
|
run: yarn depcheck
|
|
- name: Yarn Dedupe check
|
|
run: yarn dedupe --check
|
|
- name: Check dependency domain lists
|
|
run: ./scripts/ci/list-missing-dependencies.sh
|
|
- name: Verify Workspace Resolutions
|
|
run: yarn check-workspace-resolutions
|
|
- name: Msg-system Config Validation
|
|
run: yarn workspace @suite-common/message-system validate-config
|
|
- name: Translation Duplicates
|
|
run: yarn workspace @suite/intl translations:list-duplicates
|
|
|
|
|
|
releases-revision-checks:
|
|
name: Releases revision Checks
|
|
needs: setup-and-cache
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Check releases.json files changes
|
|
uses: dorny/paths-filter@v3
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
releases-json:
|
|
- 'packages/connect-data/files/firmware/t1b1/releases.json'
|
|
- 'packages/connect-data/files/firmware/t2t1/releases.json'
|
|
- name: "Checkout branches for Nx"
|
|
if: steps.changes.outputs.releases-json == 'true'
|
|
uses: ./.github/actions/nx-checkout
|
|
- name: "Minimal yarn install"
|
|
if: steps.changes.outputs.releases-json == 'true'
|
|
uses: ./.github/actions/minimal-yarn-install
|
|
|
|
- name: Check releases.json revisions
|
|
if: steps.changes.outputs.releases-json == 'true'
|
|
run: yarn workspace @trezor/connect-data validate-releases.json
|