diff --git a/.github/workflows/connect-test.yml b/.github/workflows/connect-test.yml index 4b21d20b555..ab27519b289 100644 --- a/.github/workflows/connect-test.yml +++ b/.github/workflows/connect-test.yml @@ -94,6 +94,7 @@ jobs: test-pattern: ${{ matrix.pattern }} methods: ${{ matrix.methods }} tests-firmware: ${{ matrix.firmware }} + test-description: ${{ matrix.name }} strategy: fail-fast: false matrix: ${{ fromJson(needs.set-matrix.outputs.dailyMatrix) }} @@ -107,6 +108,7 @@ jobs: test-pattern: ${{ matrix.pattern }} methods: ${{ matrix.methods }} tests-firmware: ${{ matrix.firmware }} + test-description: ${{ matrix.name }}-${{ matrix.firmware }} strategy: fail-fast: false matrix: ${{ fromJson(needs.set-matrix.outputs.legacyCanaryFirmwareMatrix) }} @@ -114,15 +116,16 @@ jobs: connect-other-devices: needs: [build, set-matrix] if: github.event_name == 'schedule' && github.repository == 'trezor/trezor-suite' - name: other-devices-${{ matrix.name }} + name: other-devices-${{ matrix.name }}-${{ matrix.model }} uses: ./.github/workflows/template-connect-test-params.yml with: test-pattern: ${{ matrix.pattern }} methods: ${{ matrix.methods }} tests-firmware: ${{ matrix.firmware }} - test-firmware-model: "R" + test-firmware-model: ${{ matrix.model }} node-environment: ${{ matrix.node-environment }} web-environment: ${{ matrix.web-environment }} + test-description: ${{ matrix.name }}-${{ matrix.firmware }}-${{ matrix.model }} strategy: fail-fast: false matrix: ${{ fromJson(needs.set-matrix.outputs.otherDevicesMatrix) }} diff --git a/.github/workflows/template-connect-test-params.yml b/.github/workflows/template-connect-test-params.yml index 65ae4ed112b..aec6ab3891a 100644 --- a/.github/workflows/template-connect-test-params.yml +++ b/.github/workflows/template-connect-test-params.yml @@ -30,10 +30,15 @@ on: type: "boolean" required: false default: true + test-description: + description: "A description to make test title more descriptive (example: 2-latest-R)" + type: "string" + required: false + default: "" jobs: node: - name: node + name: "node-${{ inputs.test-description }}" runs-on: ubuntu-latest if: ${{ inputs.node-environment }} steps: @@ -51,7 +56,7 @@ jobs: - run: './docker/docker-connect-test.sh node -p "${{ inputs.test-pattern }}" -f "${{ inputs.tests-firmware }}" -i ${{ inputs.methods }} -m ${{ inputs.test-firmware-model}}' web: - name: web + name: "web-${{ inputs.test-description }}" runs-on: ubuntu-latest if: ${{ inputs.web-environment }} steps: diff --git a/ci/scripts/connect-test-matrix-generator.js b/ci/scripts/connect-test-matrix-generator.js index 66dd456e593..6df38fc518d 100644 --- a/ci/scripts/connect-test-matrix-generator.js +++ b/ci/scripts/connect-test-matrix-generator.js @@ -77,6 +77,7 @@ const legacyCanaryFirmware = { const otherDevices = { firmwares: ['2-latest'], + models: ['R', 'T3T1'], tests: [ { name: 'api', @@ -147,8 +148,14 @@ const otherDevices = { ], }; -const prepareTest = ({ firmwares, tests }) => { - return tests.flatMap(test => firmwares.map(firmware => ({ firmware, ...test }))); +const prepareTest = ({ firmwares, tests, models }) => { + const withFirmwares = tests.flatMap(test => firmwares.map(firmware => ({ firmware, ...test }))); + + if (models && models.length > 0) { + return withFirmwares.flatMap(test => models.map(model => ({ model, ...test }))); + } else { + return withFirmwares; + } }; const testData = {