chore(connect-common): rename T3W1 firmware binary #42
Workflow file for this run
This file contains hidden or 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
| name: "[Template] connect unit" | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| testPattern: | ||
| description: "Test pattern to use to match for test files (example: `init` or `methods`)" | ||
| type: "string" | ||
| required: true | ||
| includeFilter: | ||
| description: "List of methods to include in tests (example: applySettings,applyFlags,getFeatures)" | ||
| type: "string" | ||
| required: false | ||
| testsFirmware: | ||
| description: "Firmware version for the tests (example: 2-latest, 2.2.0, 2-main)" | ||
| type: "string" | ||
| required: false | ||
| default: "2-latest" | ||
| testFirmwareModel: | ||
| description: "Firmware model for the tests (example: T3T1)" | ||
| type: "string" | ||
| required: false | ||
| testDescription: | ||
| description: "A description to make test title more descriptive (example: T3T1-latest)" | ||
| type: "string" | ||
| required: false | ||
| default: "" | ||
| testRandomizedOrder: | ||
| description: "Tests will be run in randomized order" | ||
| type: "boolean" | ||
| required: false | ||
| default: false | ||
| # After migrating from testnet 3 to testnet 4 using `disable_cache_tx=true` should be required for tests where tx are used. | ||
| disable_cache_tx: | ||
| description: "Disable Cache transactions (when `true` tests don't use cache for transactions)" | ||
| type: "string" | ||
| required: false | ||
| default: false | ||
| transport: | ||
| description: "Transport to use (example: bridge, node-bridge)" | ||
| type: "string" | ||
| required: false | ||
| default: "node-bridge" | ||
| testEnv: | ||
| description: "Environment to test (example: node, web)" | ||
| type: "string" | ||
| required: true | ||
| jobs: | ||
| test: | ||
| name: "${{ inputs.testDescription }}" | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| - name: Setup node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: ".nvmrc" | ||
| cache: yarn | ||
| - if: ${{ inputs.testEnv == 'web' }} | ||
| run: | | ||
| echo -e "\nenableScripts: false" >> .yarnrc.yml | ||
| # Install dependencies only for @trezor/connect package | ||
| - if: ${{ inputs.testEnv == 'web' }} | ||
| run: yarn workspaces focus @trezor/connect | ||
| - if: ${{ inputs.testEnv == 'web' }} | ||
| name: Retrieve build connect-web | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: build-artifact-connect-web | ||
| path: packages/connect-web/build | ||
| - if: ${{ inputs.testEnv == 'web' }} | ||
| name: Retrieve build connect-iframe | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: build-artifact-connect-iframe | ||
| path: packages/connect-iframe/build | ||
| - if: ${{ inputs.testEnv == 'web' }} | ||
| run: cd packages/connect-iframe && tree . | ||
| - if: ${{ inputs.testEnv == 'web' }} | ||
| name: "Echo download path" | ||
| run: echo ${{steps.download.outputs.download-path}} | ||
| # todo: ideally do not install everything. possibly only devDependencies could be enough for testing (if there was not for building libs)? | ||
| - if: ${{ inputs.testEnv == 'node' }} | ||
| run: sed -i "/\"node\"/d" package.json | ||
| - if: ${{ inputs.testEnv == 'node' }} | ||
| run: yarn workspaces focus @trezor/connect | ||
| run: yarn install | ||
| run: yarn workspace @trezor/transport-bridge build:js | ||
| - if: ${{ inputs.disable_cache_tx == 'true' }} | ||
| run: echo "ADDITIONAL_ARGS=-c" >> "$GITHUB_ENV" | ||
| - if: ${{ inputs.testFirmwareModel }} | ||
| run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -m ${{ inputs.testFirmwareModel }}" >> "$GITHUB_ENV" | ||
| - if: ${{ inputs.includeFilter }} | ||
| run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -i ${{ inputs.includeFilter }}" >> "$GITHUB_ENV" | ||
| - if: ${{ inputs.testRandomizedOrder }} | ||
| run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -r" >> "$GITHUB_ENV" | ||
| - if: ${{ inputs.transport }} | ||
| run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -t ${{ inputs.transport }}" >> "$GITHUB_ENV" | ||
| - run: './docker/docker-connect-test.sh ${{ inputs.testEnv }} -p "${{ inputs.testPattern }}" -f "${{ inputs.testsFirmware }}" $ADDITIONAL_ARGS' | ||